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

Bump bump

0

Probably just me, but I can't wrap my head around what you're trying to achieve with this:

Patient::customer(Auth::user()->user_customer)->find($Id)->first();

The customer(Auth::user()->user_customer) will set a filter on px_customer, but won't find($id) overwrite that and just do a select on the primary key?

Last updated 9 years ago.
0

It's my understanding that you can call ->find() after a scope, and it will "find" in the filtered resultset. Am I wrong?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

rberlin01 rberlin01 Joined 5 Sep 2015

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.