By default, Laravel’s eloquent presumes that each table in the database has a primary key column with name id. We can easily override this behaviour by adding a single line of code to your Model.
Quick Tip : How to change the redirect URL when logging out?
To define a custom primary key create a $primaryKey property.
/** * primaryKey * * @var string * @access protected */ protected $primaryKey = 'user_id';