示例#1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $people = People::all();
     $cpu = asset::whereRaw('status = "idle" and type = "cpu"')->get();
     $memory = asset::whereRaw('status="idle" and type="memory"')->get();
     $mainboard = asset::whereRaw('status="idle" and type="mainboard"')->get();
     $harddisk = asset::whereRaw('status="idle" and type="harddisk"')->get();
     return view('hardware.devices')->withDevices(devices::all())->withPeople($people)->withCpu($cpu)->withMemory($memory)->withMainboard($mainboard)->withHarddisk($harddisk);
 }