andreossido / laravel-odbc

ODBC integration for Laravel framework
35 stars 29 forks source link

Error, you must override this method! lastInsertId($name = null) #6

Open ConsSorto opened 4 years ago

ConsSorto commented 4 years ago

i try use this package in laravel 6.x but dosn work, and i use in laravel 5.8 but when i work with a user model and i try to insert the application give me a next error.

Exception Error, you must override this method!

public function lastInsertId($name = null) { throw new Exception("Error, you must override this method!"); }

what is the solution for this, i work in windows with sybase database.

Kip-Rono commented 2 years ago

This might be due to a column 'idx' on your database. I presume you are trying to save data to your database with a column 'idx' that was meant to be incrementing but either your code is not incrementing the column nor your database schema