Ejemplo n.º 1
0
 public function showServiceSpecificOrderToAdmin($orderId)
 {
     $order = ServiceOrder::with('service_status', 'firm')->where('id', $orderId)->first();
     $statuses = ServiceStatus::all();
     if ($order->is_new == 1) {
         $order->is_new = 0;
         $order->save();
     }
     $documents = Document::where('service_order_id', $orderId)->orderBy('type')->get();
     $documentTypes = [1 => 1, 2 => 2, 3 => 3];
     $serviceAgreement = Document::where('type', Order::CONTRACT_TYPE)->where('user_id', $order->user_id)->first();
     return view('orders.showServiceSpecificOrderToAdmin', ['order' => $order, 'statuses' => $statuses, 'documents' => $documents, 'documentTypes' => $documentTypes, 'serviceAgreement' => $serviceAgreement]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $statuses = ServiceStatus::all();
     return view('serviceStatuses.index', ['statuses' => $statuses]);
 }