laravel 8 model save get id code example Example: laravel model save get id $data->save(); $data->id;