Esempio n. 1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $phones = Phone::with(['company', 'category', 'paymentCompany'])->get();
     return view('phone.index', compact('phones'));
 }
Esempio n. 2
0
 public function statisticsAction()
 {
     return Phone::with('order', 'ships', 'order.unit')->whereHas('order.purpose', function ($q) {
         $q->where('group', 'monitor');
     })->where('status', 'success')->get();
 }