1-- To get the last inserted auto-increment row ID: --
2SELECT LAST_INSERT_ID( optional_expression )
3
4-- If you have just inserted it using a command in C# use: --
5int lastId = (Int32)yourCommand.LastInsertedId;
1//laravel controller
2$newOrder = new Order();
3...
4...
5$newOrder->save();
6
7$last_id = $newOrder->id;