In Laravel 4, when you perform a DB::insert(), how can you get the ID of the row that has just been inserted? Similar what we have with the function ->
DB::insert()
->
There is a insertGetId() method, as follows:
insertGetId()
$dataset = array('column_id' => 1, 'name' => 'Dayle'); $column_id = DB::table('users')->insertGetId($dataset,'column_id');