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