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

Just some of my thoughts, why not use the store() directly and make another protected function in your controller, push those input data into that function to handle the login validation instead?

You could then return the result and give control back to store(), for example, a boolean of a pass/no pass and as well as the errors handling and let store() decides what to do next (or you could throw exceptions and let the exception handles this matter I guess ?) .

In that case not only your store() can share this protected function but your update() which you might likely need that later can share this similar "gateway" to check if user is authenticated.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

adunahay adunahay Joined 3 Feb 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.