pluck multiple relation laravel code example
Example 1: eloquent pluck multiple columns
$records = $records->pluck('data', 'id')->toArray();
// [
// 'id' => 'data',
// ...
//]
Example 2: laravel pluck multiple columns
YourModelName::all('id', 'name');