find last inseted id of perticular user in laravel code example
Example 1: laravel get last id
DB::table('myTable')->orderBy('id','desc')->first();
Example 2: laravel get ID from insert
$data = User::create(['name'=>'first']);
dd($data->id);
DB::table('myTable')->orderBy('id','desc')->first();
$data = User::create(['name'=>'first']);
dd($data->id);