Support the ongoing development of →
posted 4 years ago
Last updated 1 year ago.

are you using auth for your request? checking for auth user ?


No, the /abc route place at the top of api.php without any middleware auth


That is how Laravel works I suppose. It creates the blank object (User) and then query the data from DB to it (I am not sure what is the 3rd time for to be honest)

I never use constructor in Laravel app inside Model class.. there are surely other ways to accomplish what you need


Dear all,

I feel sorry about that. Today I repeat the experience again. The constructor have been called 2 times not 3 times.


Sign in to participate in this thread!


Your banner here too?


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

Your logo here?

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

© 2023 - All rights reserved.