Prechádzať zdrojové kódy

added lazy loading on note

= 1 rok pred
rodič
commit
f3061b1ea6
1 zmenil súbory, kde vykonal 32 pridanie a 1 odobranie
  1. 32 1
      app/Http/Controllers/NoteController.php

+ 32 - 1
app/Http/Controllers/NoteController.php

@@ -25,8 +25,39 @@ use Illuminate\Support\Facades\DB;
 class NoteController extends Controller
 {
 
-    public function dashboard(Request $request, Client $patient, Note $note)
+    public function dashboard(Request $request, Client $patient,  $noteUid)
     {
+
+        $note = Note::with(
+    'client',
+            'hcpPro',
+            'hcpCompanyPro',
+            'noteTemplate',
+            'createdSession',
+            'allyPro',
+            'followUpAppointment',
+            'cmSetupClaim',
+            'naGenericBill',
+            'bills',
+            'addendums',
+            'sections',
+            //'segments',
+            'segmentsLeft',
+            'segmentsRight',
+            'coreSegment',
+            'reasonsLog',
+            'claims',
+            'receivedPayments',
+            'hcpCompany',
+            'hcpCompanyProPayer',
+            'hcpCompanyLocation',
+            'flaggedForSupervisingPhysicianReviewBySession',
+            'stampedBySupervisingPhysicianBySession',
+            'currentNotePickupForProcessing',
+            'visitTemplate',
+            'cmSetupManagerSignatureStatusUpdatedBySession'
+        )->where('uid', $noteUid)->first();
+
         $pros = $this->pros;
         $noteSections = $note->sections;
         $allSections = SectionTemplate::where('is_active', true)->get();