Support the ongoing development of Laravel.io →
posted 6 years ago
Last updated 1 year ago.
0
Solution

Hi,

as stated in the documentation you can add custom conditions to Auth::attempt but only for equality checks.

In your case the only option would be to override the login method in the LoginController (method is defined in the AuthenticatesUsers trait) and add your custom check just before sending the login response.

Last updated 6 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.