how to get the id of new record in laravel code example Example: laravel get ID from insert $data = User::create(['name'=>'first']); dd($data->id);