how to insert and get id in laravel code example Example: laravel model save get id $data->save(); $data->id;