get all values from a relation connected by id laravel code example
Example 1: laravel where on relationsship column
Player::whereHas('roleplay', function($q){
$q->where('column_name', 'value');
})->get();
Example 2: Laravel DB facade relations
$antiques = DB::table('antiques')
->join('images', 'images.antiques_id', '=', 'antiques.id')
->latest()
->limit(20)
->get(['antiques.*', 'images.path']);