samedi 25 mars 2017

Modifiying Users Table in Laravel

I am just starting out with Laravel but am not new PHP frameworks.

I have Laravel 5.4 and have run php artisan make:auth to activate auth.

I have a custom users mysql table and want to use this instead, with different columns.

Before I am inundated with "Duplicate question" comments, I have read every other (3 pages of Google searches worth) suggestion out there. Maybe I don't understand them or they are for different versions but nothing has worked.

My table name is users My columns are:

user_id
user_email
user_password
... etc

When I try to log in I get Username and Password are required from the validator. When I change the field names I get column not found: 1054 Unknown column 'email' in 'where clause'.

I can see from the stack trace that the issue is coming from within the vendor\laravel\framework\src\illuminate\Foundation folder but I also know not to modify anything in the vendor folder.

Can someone please help me get this working?

I haven't modified any of the core code. It is exactly as it would be if you ran make:auth on a new install. I know this as I have the project git tracked.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2n4v3Ln
via IFTTT

Aucun commentaire:

Enregistrer un commentaire