$token = auth()->attempt($request->only(['email', 'password']));
Returns true on Laravel 6, and not token.
| Q | A
| ----------------- | ---
| Bug? | yes
| New Feature? | no
| Framework | Laravel
| Framework version | 6.0.0
| Package version | 1.0.0-rc.5
| PHP version | 7.2.4
$token = auth()->attempt($request->only(['email', 'password']));
Previously returned actual token on Laravel 5.8
$token = auth()->attempt($request->only(['email', 'password']));
Should return token if attempt is successfull.
$token = auth()->attempt($request->only(['email', 'password']));
Returns true on Laravel 6.
For people having the same problem use:
$token = auth('api')->attempt($request->only(['email', 'password']))
instead of:
$token = auth()->attempt($request->only(['email', 'password']));
`
/**
Most helpful comment
For people having the same problem use:
$token = auth('api')->attempt($request->only(['email', 'password']))instead of:
$token = auth()->attempt($request->only(['email', 'password']));