I'm using Laravel 5 and I want to use the auth.basic
middleware. But in my database, the table used for authentication ( usuarios
), does not have the email
field, but username
- the default expected by Laravel 5 is email
.
I was able to quietly configure AuthController
to authenticate using a custom field. But these settings are not the same for auth.basic
, because the following error is being generated when trying to do this type of authentication:
Column not found: 1054 Unknown column 'email' in 'where clause'
I have already researched Stackoverflow in English, in the documentation and looked at the source code, and so far I have not found a solution.
Does anyone know a simple way to set middleware
of auth.basic
to be able to Basic
?