Support the ongoing development of Laravel.io →
Authentication Security Requests
Last updated 2 years ago.
0

By not using the LoginRequest class you're bypassing any validation that would be done for that request. It's not ideal, but at the end of the day you're still attempting (->attempt()) against the Guard/$auth object, so it's not doing you any harm.

However, this is a great feature of the new L5 codebase. You don't have to worry about handling validation (one of the major components of any application) at the controller level. Thereby reducing the number of lines you have to write yourself (and you'll find yourself repeating ALL the time).

I can't understand why changing out the request object would resolve the auth class (which is called Guard) for you, though. You haven't changed anything in that respect.

Jeffrey Way has outlined some details surrounding it here -> https://laracasts.com/series/whats-new-in-laravel-5/episodes/3

Last updated 2 years ago.
0

Got this one figured out finally, in the LoginRequest.php file I hadn't changed email to userid, which is what I use. It works with:

public function postLogin(LoginRequest $request)

now.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jimgwhit jimgwhit Joined 13 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.