laravel return eliquent id code example
Example 1: laravel eloquent remove from db
$res=User::where('id',$id)->delete();
Example 2: laravel get ID from insert
$data = User::create(['name'=>'first']);
dd($data->id);
$res=User::where('id',$id)->delete();
$data = User::create(['name'=>'first']);
dd($data->id);