G
G
GrimJack2017-07-27 15:08:53
Laravel
GrimJack, 2017-07-27 15:08:53

Why could laravel authorization fail?

It was necessary to rename the id field in the users table to user_id
Now the user does not pass the middleware check (for api on the laravel passport too)
I could do something like this:

Auth::attempt($data);
dd(Auth::user());

Then we can get the user's data, but after going to a page that is available only to authorized ones, we get a redirect to authorization
. What can be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2017-07-27
@GrimJack

https://laravel.com/docs/5.4/eloquent#defining-models, Primary Keys section - done?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question