get id from insert laravel code example Example: laravel get last id DB::table('myTable')->orderBy('id','desc')->first();