laravel where on relationsship column
Player::whereHas('roleplay', function($q){
$q->where('column_name', 'value');
})->get();
laravel where on relationsship column
Player::whereHas('roleplay', function($q){
$q->where('column_name', 'value');
})->get();
associate laravel
When updating a belongsTo relationship, you may use the associate method. This
method will set the foreign key on the child model:
$account = AppAccount::find(10);
$user->account()->associate($account);
$user->save();
When removing a belongsTo relationship, you may use the dissociate method. This
method will set the relationship foreign key to null:
$user->account()->dissociate();
$user->save();
Laravel DB facade relations
$antiques = DB::table('antiques')
->join('images', 'images.antiques_id', '=', 'antiques.id')
->latest()
->limit(20)
->get(['antiques.*', 'images.path']);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us