Ларавел Отношения Отношения
Seller::with('user')->get()->pluck('user.first_name', 'id')
MrDracoula
Seller::with('user')->get()->pluck('user.first_name', 'id')
$name = DB::table('users')->where('name', 'John')->pluck('name');
DB::table('users')->where('id', 1)->pluck('name')->first();
$users = Users::pluck('name','email');
dd($users);
$collection = collect([
'serial' => 'UX301', 'type' => 'screen', 'year' => 2009,
]);
$intersect = $collection->intersectByKeys([
'reference' => 'UX404', 'type' => 'tab', 'year' => 2011,
]);
$intersect->all();
// ['type' => 'screen', 'year' => 2009]