laravel db query select first code example
Example: laravel query builder select first
$user = DB::table('users')->where('name', 'John')->first();
var_dump($user->name);
$user = DB::table('users')->where('name', 'John')->first();
var_dump($user->name);