get first record from collection laravel code example
Example 1: laravel get first record
'First email'
User::whereEmail($email)->first();
'First Record'
User::first();
Example 2: collection get first element laravel
$first = $msgs->first(); // this does ->take(1) under the hood