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

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

0

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

0

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

0

Dear all,

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

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.