Beispiel #1
0
 public static function addNew(Request $request)
 {
     $docket = new Docket();
     $docket->name = $request->input('name');
     $docket->lab_id = $request->input('lab_id');
     $docket->save();
     $docket->addBackgroundImage($request->file('background_image'));
     return $docket;
 }
 public function showCompleteDocket($lab_work_id, $docket_id)
 {
     $lab_work = LabWork::findOrFail($lab_work_id);
     $docket = Docket::findOrFail($docket_id);
     if ($lab_work->branch->addresses->count() > 0) {
         $branch_postcode = $lab_work->branch->addresses()->first()->postcode;
     } else {
         $branch_postcode = '';
     }
     $vars = ["lab_work" => $lab_work, "docket" => $docket, "branch_postcode" => $branch_postcode];
     return view('backend.page.complete-docket')->with($vars);
 }
Beispiel #3
0
 /**
  * Treat this method as a controller action.
  * Return view() or other content to display.
  */
 public function run()
 {
     //
     return view("widgets.docket_index", ['dockets' => \App\Docket::all()]);
 }
Beispiel #4
0
 /**
  * Treat this method as a controller action.
  * Return view() or other content to display.
  */
 public function run()
 {
     //
     return view("widgets.select_docket", ['dockets' => \App\Docket::lists('name', 'id')->toArray()]);
 }