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