當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Schedule::all方法代碼示例

本文整理匯總了PHP中Schedule::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Schedule::all方法的具體用法?PHP Schedule::all怎麽用?PHP Schedule::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Schedule的用法示例。


在下文中一共展示了Schedule::all方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: action_index

 public function action_index()
 {
     $instructors = Instructor::all();
     $schedule = Schedule::all('Fall 2012');
     //dd($instructors);
     //dd($schedule);
     $data = array('itp_instructors' => $instructors, 'scheduled_courses' => $schedule);
     return View::make('home.index', $data);
 }
開發者ID:nayeonk,項目名稱:ITP404-MVC,代碼行數:9,代碼來源:home.php

示例2: index

 public function index()
 {
     //Get the markers
     $markers = Bulb::all();
     $markersCount = Bulb::all()->count();
     $clusters = Cluster::all();
     $clustersCount = Cluster::all()->count();
     //Get bulbs
     $bulbs = Bulb::all();
     $bulbsCount = Bulb::all()->count();
     //Get distinct bulbs
     $distinct_bulbs = array_fetch(DB::select("SELECT DISTINCT bulb_id FROM poweranalyzers ORDER BY bulb_id"), 'bulb_id');
     $readings = Bulb::whereIn('id', $distinct_bulbs)->get();
     $readingsCount = count($readings);
     //Get schedules
     $schedules = Schedule::all();
     $schedulesCount = Schedule::all()->count();
     return View::make('home')->with('markers', $markers)->with('markersCount', $markersCount)->with('clusters', $clusters)->with('clustersCount', $clustersCount)->with('bulbs', $bulbs)->with('bulbsCount', $bulbsCount)->with('readings', $readings)->with('readingsCount', $readingsCount)->with('schedules', $schedules)->with('schedulesCount', $schedulesCount);
 }
開發者ID:kanaanto,項目名稱:ProjectIlaw,代碼行數:19,代碼來源:HomeController.php

示例3: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     if (Auth::check()) {
         $clusters = Cluster::all();
         $clustersCount = Cluster::all()->count();
         //Get bulbs
         $bulbs = Bulb::all();
         $bulbsCount = Bulb::all()->count();
         //Get schedules
         $schedules = Schedule::all();
         $schedulesCount = Schedule::all()->count();
         $distinct_bulbs = array_fetch(DB::select("SELECT DISTINCT bulb_id FROM poweranalyzers ORDER BY bulb_id"), 'bulb_id');
         $readings = Bulb::whereIn('id', $distinct_bulbs)->get();
         $readingsCount = count($readings);
         $markers = Cluster::find($id)->bulbs;
         $markersCount = count($markers);
         return View::make('cluster')->with('markers', $markers)->with('markersCount', $markersCount)->with('clusters', $clusters)->with('clustersCount', $clustersCount)->with('bulbs', $bulbs)->with('bulbsCount', $bulbsCount)->with('readings', $readings)->with('readingsCount', $readingsCount)->with('schedules', $schedules)->with('schedulesCount', $schedulesCount);
     }
 }
開發者ID:kanaanto,項目名稱:ProjectIlaw,代碼行數:25,代碼來源:ClustersController.php

示例4: insert_periods

 protected function insert_periods()
 {
     $schedules = Schedule::all();
     foreach ($schedules as $schedule) {
         // 1/4幾率將該schedule設為無號源
         if (rand(0, 3)) {
             if ($schedule->period == 0) {
                 Period::create(['start' => '8:00', 'end' => '9:30', 'total' => 10, 'current' => 0, 'schedule_id' => $schedule->id]);
             } else {
                 if ($schedule->period == 1) {
                     Period::create(['start' => '14:00', 'end' => '15:30', 'total' => 10, 'current' => 0, 'schedule_id' => $schedule->id]);
                 }
             }
         }
     }
 }
開發者ID:Jv-Juven,項目名稱:hospital-register-system,代碼行數:16,代碼來源:InsertTestDataCommand.php

示例5: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //Get the markers
     $marker = Bulb::find($id);
     //Get clusters
     //$clusters = DB::table($cluster_tbl)->lists('clusterid','name');
     $clusters = Cluster::all();
     $clustersCount = Cluster::all()->count();
     //Get bulbs
     $bulbs = Bulb::all();
     $bulbsCount = Bulb::all()->count();
     //Get readings
     $readings = Poweranalyzer::all();
     $readingsCount = count($readings);
     //Get schedules
     $schedules = Schedule::all();
     $schedulesCount = Schedule::all()->count();
     return View::make('bulb')->with('marker', $marker)->with('clusters', $clusters)->with('clustersCount', $clustersCount)->with('bulbs', $bulbs)->with('bulbsCount', $bulbsCount)->with('readings', $readings)->with('readingsCount', $readingsCount)->with('schedules', $schedules)->with('schedulesCount', $schedulesCount);
     //return $marker;
 }
開發者ID:kanaanto,項目名稱:ProjectIlaw,代碼行數:26,代碼來源:BulbsController.php

示例6: index

 /**
  * Display a listing of schedules
  *
  * @return Response
  */
 public function index()
 {
     $schedules = Schedule::all();
     $menu = 'academic';
     return View::make('schedules.index', compact('schedules', 'menu'));
 }
開發者ID:emanmks,項目名稱:oneschool,代碼行數:11,代碼來源:SchedulesController.php


注:本文中的Schedule::all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。