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?
It's my understanding that you can call ->find() after a scope, and it will "find" in the filtered resultset. Am I wrong?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community