当前位置: 首页>>代码示例>>PHP>>正文


PHP Schedule::where方法代码示例

本文整理汇总了PHP中Schedule::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Schedule::where方法的具体用法?PHP Schedule::where怎么用?PHP Schedule::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Schedule的用法示例。


在下文中一共展示了Schedule::where方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: schedules

 public function schedules()
 {
     $schedules = Schedule::where('user_id', '=', Auth::user()->id)->paginate(10);
     $page_data = array('schedules' => $schedules);
     $this->layout->title = 'Schedules';
     $this->layout->content = View::make('admin.schedules', $page_data);
 }
开发者ID:anchetaWern,项目名称:ahead,代码行数:7,代码来源:SettingsController.php

示例2: showWeek

 /**
  * Generate the view of the week for given month and given year
  * with events in this period.
  *
  * @param string $year
  * @param string $week 
  * @return view weekView
  *
  *
  */
 public function showWeek($year, $week)
 {
     // Create week start date on monday (day 1)
     $weekStart = date('Y-m-d', strtotime($year . "W" . $week . '1'));
     // Create the number of the next week
     $nextWeek = date("W", strtotime("next Week" . $weekStart));
     $nextYear = date("Y", strtotime("next Week" . $weekStart));
     // Create week end date - we go till tuesday (day 2) because café needs alternative week view (Mi-Di)
     $weekEnd = date('Y-m-d', strtotime($nextYear . "W" . $nextWeek . '2'));
     // Create the number of the previous week
     $previousWeek = date("W", strtotime("previous Week" . $weekStart));
     $previousYear = date("Y", strtotime("previous Week" . $weekStart));
     // Convert number of prev/next week to verbatim format - needed for correct << and >> button links
     $nextWeek = $nextYear . "/KW" . $nextWeek;
     $previousWeek = $previousYear . "/KW" . $previousWeek;
     $date = array('year' => $year, 'week' => $week, 'weekStart' => $weekStart, 'weekEnd' => $weekEnd, 'nextWeek' => $nextWeek, 'previousWeek' => $previousWeek);
     $events = ClubEvent::where('evnt_date_start', '>=', $weekStart)->where('evnt_date_start', '<=', $weekEnd)->with('getPlace', 'getSchedule.getEntries.getJobType', 'getSchedule.getEntries.getPerson.getClub')->orderBy('evnt_date_start')->orderBy('evnt_time_start')->get();
     $tasks = Schedule::where('schdl_show_in_week_view', '=', '1')->where('schdl_due_date', '>=', $weekStart)->where('schdl_due_date', '<=', $weekEnd)->with('getEntries.getPerson.getClub', 'getEntries.getJobType')->get();
     // TODO: don't use raw query, rewrite with eloquent.
     $persons = Cache::remember('personsForDropDown', 10, function () {
         $timeSpan = new DateTime("now");
         $timeSpan = $timeSpan->sub(DateInterval::createFromDateString('3 months'));
         return Person::whereRaw("prsn_ldap_id IS NOT NULL \n\t\t\t\t\t\t\t\t\t\t AND (prsn_status IN ('aktiv', 'kandidat') \n\t\t\t\t\t\t\t\t\t\t OR updated_at>='" . $timeSpan->format('Y-m-d H:i:s') . "')")->orderBy('clb_id')->orderBy('prsn_name')->get();
     });
     $clubs = Club::orderBy('clb_title')->lists('clb_title', 'id');
     // IDs of schedules shown, needed for bulk-update
     $updateIds = array();
     foreach ($events as $event) {
         array_push($updateIds, $event->getSchedule->id);
     }
     return View::make('weekView', compact('events', 'schedules', 'date', 'tasks', 'entries', 'weekStart', 'weekEnd', 'persons', 'clubs'));
 }
开发者ID:gitter-badger,项目名称:lara-vedst,代码行数:42,代码来源:WeekController.php

示例3: get_fleetsonnotprintspj

 public function get_fleetsonnotprintspj()
 {
     $date = Input::get('date', date('Y-m-d'));
     $pool_id = Auth::user()->pool_id;
     $timestamp = strtotime($date);
     /*
     $fleets_on_not_printspj = Scheduledate::join('schedules','schedules.id','=','schedule_dates.schedule_id')
                 ->join('fleets', 'fleets.id', '=', 'schedules.fleet_id' )
                 //->join('ksos', 'ksos.fleet_id', '=', 'schedules.fleet_id' )
                 //->where_in('schedule_dates.schedule_id', $arrayschedule )
                 //->where('ksos.actived','=',1)
                 ->where('schedules.pool_id', '=', $pool_id )
                 ->where('schedule_dates.date', '=', date('j', $timestamp))
                 ->where('schedules.month','=',date('n', $timestamp ))
                 ->where('schedule_dates.fg_check','=',0)                  
                 ->order_by('fleets.taxi_number','asc')
                 ->get(array('schedule_dates.id as id','schedule_dates.driver_id','schedules.fleet_id','fleets.taxi_number'));
     */
     $arrayschedule = array();
     $schedule = Schedule::where('month', '=', date('n', $timestamp))->where('year', '=', date('Y', $timestamp))->get(array('id', 'fleet_id'));
     foreach ($schedule as $sc) {
         $arrayschedule[] = $sc->id;
     }
     $fleets_on_not_printspj = array();
     if (is_array($arrayschedule) && !empty($arrayschedule)) {
         $fleets_on_not_printspj = Scheduledate::join('schedules', 'schedules.id', '=', 'schedule_dates.schedule_id')->join('fleets', 'fleets.id', '=', 'schedules.fleet_id')->where_in('schedule_dates.schedule_id', $arrayschedule)->where('schedules.pool_id', '=', Auth::user()->pool_id)->where('schedule_dates.date', '=', date('j', $timestamp))->where('schedule_dates.fg_check', '=', 0)->order_by('fleets.taxi_number', 'asc')->get(array('fleets.taxi_number', 'schedule_dates.id as id'));
     }
     $datas = array_map(function ($object) {
         return $object->to_array();
     }, $fleets_on_not_printspj);
     return Response::json($datas);
 }
开发者ID:acmadi,项目名称:diantaksi,代码行数:32,代码来源:dash.php

示例4: post_search

 public function post_search()
 {
     $jsondata = Input::json();
     $date = $jsondata->date;
     $timestamp = strtotime($date);
     //list armada on schedule
     $arrayschedule = array();
     $schedule = Schedule::where('month', '=', date('n', $timestamp))->where('year', '=', date('Y', $timestamp))->get(array('id', 'fleet_id'));
     foreach ($schedule as $sc) {
         $arrayschedule[] = $sc->id;
     }
     $fleets = array();
     if (is_array($arrayschedule) && !empty($arrayschedule)) {
         $fleets = Scheduledate::join('schedules', 'schedules.id', '=', 'schedule_dates.schedule_id')->join('fleets', 'fleets.id', '=', 'schedules.fleet_id')->join('ksos', 'ksos.fleet_id', '=', 'schedules.fleet_id')->where_in('schedule_dates.schedule_id', $arrayschedule)->where('schedules.pool_id', '=', Auth::user()->pool_id)->where('schedule_dates.date', '=', date('j', $timestamp))->where('schedules.month', '=', date('n', $timestamp))->where('ksos.actived', '=', 1)->where('taxi_number', 'LIKE', '%' . $jsondata->taxi_number . '%')->get(array('schedule_dates.id as id', 'schedule_dates.driver_id', 'schedules.fleet_id', 'fleets.taxi_number'));
     }
     $fleetdatas = array_map(function ($object) {
         return $object->to_array();
     }, $fleets);
     $data['fleet'] = $fleetdatas;
     return json_encode($data);
 }
开发者ID:acmadi,项目名称:diantaksi,代码行数:21,代码来源:checkouts.php

示例5: get_schedule

 public function get_schedule()
 {
     $callback = Input::get('callback');
     $date = Input::get('date', date('Y-m-d'));
     $pool = Input::get('pool');
     $timestamp = strtotime($date);
     //list armada on schedule
     $arrayschedule = array();
     $schedule = Schedule::where('month', '=', date('n', $timestamp))->where('year', '=', date('Y', $timestamp))->get(array('id', 'fleet_id'));
     foreach ($schedule as $sc) {
         $arrayschedule[] = $sc->id;
     }
     $fleets = array();
     if (is_array($arrayschedule) && !empty($arrayschedule)) {
         $fleets = Scheduledate::join('schedules', 'schedules.id', '=', 'schedule_dates.schedule_id')->join('fleets', 'fleets.id', '=', 'schedules.fleet_id')->join('ksos', 'ksos.fleet_id', '=', 'schedules.fleet_id')->where_in('schedule_dates.schedule_id', $arrayschedule)->where('schedules.pool_id', '=', $pool)->where('schedule_dates.date', '=', date('j', $timestamp))->where('schedules.month', '=', date('n', $timestamp))->where('ksos.actived', '=', 1)->order_by('fleets.taxi_number', 'asc')->get(array('schedule_dates.id as id', 'schedule_dates.driver_id', 'schedules.fleet_id', 'fleets.taxi_number', 'schedule_dates.fg_check as out'));
         //->get(array('fleets.taxi_number','schedule_dates.id as id', 'schedule_dates.fg_check as out'));
     }
     $fleetdatas = array_map(function ($object) {
         return $object->to_array();
     }, $fleets);
     return Response::jsonp($callback, $fleetdatas);
 }
开发者ID:acmadi,项目名称:diantaksi,代码行数:22,代码来源:api.php

示例6: showMonth

 /**
  * Generate the view of the calender for given month and given year
  * with events in this period.
  *
  * @param string $year
  * @param string $month 
  * @return view monthView
  */
 public function showMonth($year, $month)
 {
     // Create a string of the start of the month
     $monthStart = $year . $month . '01';
     // String of end of month
     $monthEnd = $year . $month . '31';
     // Create timestamp of the first day of selected month. Time 12:12:12 used only as dummy time
     $usedTime = mktime(12, 12, 12, $month, 1, $year);
     // Create a int with the number of days of the month (28...31)
     $daysOfMonth = date("t", $usedTime);
     // Create a timestamp with start of month
     $startStamp = mktime(0, 0, 0, date("n", $usedTime), 1, date("Y", $usedTime));
     // Int for the start day
     $startDay = date("N", $startStamp);
     // Int for the lst day
     $endDay = date("N", mktime(0, 0, 0, date("n", $usedTime), $daysOfMonth, date("Y", $usedTime)));
     // Array for german translation of the month names
     $monthName = array(1 => Config::get('messages_de.month-name-jan'), 2 => Config::get('messages_de.month-name-feb'), 3 => Config::get('messages_de.month-name-mar'), 4 => Config::get('messages_de.month-name-apr'), 5 => Config::get('messages_de.month-name-may'), 6 => Config::get('messages_de.month-name-jun'), 7 => Config::get('messages_de.month-name-jul'), 8 => Config::get('messages_de.month-name-aug'), 9 => Config::get('messages_de.month-name-sep'), 10 => Config::get('messages_de.month-name-oct'), 11 => Config::get('messages_de.month-name-nov'), 12 => Config::get('messages_de.month-name-dec'));
     $date = array('year' => $year, 'month' => $month, 'daysOfMonth' => $daysOfMonth, 'startDay' => $startDay, 'endDay' => $endDay, 'startStamp' => $startStamp, 'usedTime' => $usedTime, 'monthName' => $monthName[date("n", $usedTime)]);
     $events = ClubEvent::where('evnt_date_start', '>=', $monthStart)->where('evnt_date_start', '<=', $monthEnd)->orderBy('evnt_date_start')->orderBy('evnt_time_start')->get();
     $tasks = Schedule::where('schdl_show_in_week_view', '=', '1')->where('schdl_due_date', '>=', $monthStart)->where('schdl_due_date', '<=', $monthEnd)->get();
     return View::make('monthView', compact('events', 'tasks', 'date'));
 }
开发者ID:gitter-badger,项目名称:lara-vedst,代码行数:31,代码来源:MonthController.php

示例7: get_schedules

 public function get_schedules()
 {
     $schedules = Schedule::where('doctor_id', Session::get('doctor.id'))->where('date', 'like', Input::get('date', date('Y-m')) . '%')->orderBy('date')->get();
     //->paginate( $this->default_num_per_page );
     $schedules_map = array();
     foreach ($schedules as $schedule) {
         $date_parse = date('m-d', strtotime($schedule->date));
         if (!array_key_exists($schedule->date, $schedules_map)) {
             $schedules_map[$schedule->date] = array();
         }
         $schedules_map[$schedule->date][$schedule->period] = array('id' => $schedule->id, 'period' => $schedule->period);
     }
     $page = (int) Input::get('page');
     $schedule_count = count($schedules_map);
     $max_page = $schedule_count % $this->default_num_per_page;
     if ($page > $max_page) {
         $page = $max_page;
     }
     if ($page < 1) {
         $page = 1;
     }
     $result = array_slice($schedules_map, ($page - 1) * $this->default_num_per_page, $this->default_num_per_page);
     return Response::json(array('error_code' => 0, 'totality' => $schedule_count, 'schedules' => $result));
 }
开发者ID:Jv-Juven,项目名称:hospital-register-system,代码行数:24,代码来源:DoctorPageController.php

示例8: post_toolspj

 public function post_toolspj()
 {
     $date = Input::get('tanggal', date('Y-m-d'));
     ini_set('max_execution_time', 120);
     $timestamp = strtotime($date);
     //list armada on schedule
     $arrayschedule = array();
     $schedule = Schedule::where('month', '=', date('n', $timestamp))->where('year', '=', date('Y', $timestamp))->get(array('id', 'fleet_id'));
     foreach ($schedule as $sc) {
         $arrayschedule[] = $sc->id;
     }
     $fleets = array();
     if (is_array($arrayschedule) && !empty($arrayschedule)) {
         $fleets = Scheduledate::join('schedules', 'schedules.id', '=', 'schedule_dates.schedule_id')->join('fleets', 'fleets.id', '=', 'schedules.fleet_id')->join('ksos', 'ksos.fleet_id', '=', 'schedules.fleet_id')->where_in('schedule_dates.schedule_id', $arrayschedule)->where('schedules.pool_id', '=', Auth::user()->pool_id)->where('schedule_dates.date', '=', date('j', $timestamp))->where('schedules.month', '=', date('n', $timestamp))->where('schedule_dates.shift_id', '=', 1)->where('ksos.actived', '=', 1)->order_by('fleets.taxi_number', 'asc')->get(array('schedule_dates.id as id', 'schedule_dates.driver_id', 'schedules.fleet_id', 'fleets.taxi_number'));
     }
     if ($fleets) {
         foreach ($fleets as $f) {
             $scheduledate = Scheduledate::find($f->id);
             $scheduledate->fg_check = 1;
             $scheduledate->save();
             $schedule = Schedule::find($scheduledate->schedule_id);
             //$driverinfo = Driver::find($scheduledate->driver_id);
             //$fleetinfo = Fleet::find($schedule->fleet_id);
             $ksoinfo = Kso::where_fleet_id($schedule->fleet_id)->where_actived(1)->first();
             $dateopertion = mktime(0, 0, 0, $schedule->month, $scheduledate->date, $schedule->year);
             $checkouts = Checkout::where_fleet_id($schedule->fleet_id)->where_operasi_time(date('Y-m-d', $dateopertion))->first();
             //delete checkouts
             if ($checkouts) {
                 $checkouts->delete();
             }
             $codeops = 1;
             $status = 7;
             $keterangan = 'Print SPJ melalui Tools';
             if (!$checkouts) {
                 //insert into to checkouts step
                 $checkouts = new Checkout();
                 $checkouts->kso_id = $ksoinfo->id;
                 $checkouts->operasi_time = date('Y-m-d', $dateopertion);
                 $checkouts->fleet_id = $schedule->fleet_id;
                 $checkouts->driver_id = $scheduledate->driver_id;
                 $checkouts->checkout_step_id = $status;
                 $checkouts->shift_id = $scheduledate->shift_id;
                 $checkouts->user_id = Auth::user()->id;
                 $checkouts->pool_id = Auth::user()->pool_id;
                 $checkouts->printspj_time = date('Y-m-d H:i:s', Myfungsi::sysdate());
                 $checkouts->operasi_status_id = $codeops;
                 $checkouts->keterangan = $keterangan;
                 $checkouts->save();
                 $cinada = Checkin::where('operasi_time', '=', date('Y-m-d', $dateopertion))->where('fleet_id', '=', $schedule->fleet_id)->first();
                 if ($cinada) {
                     $cinada->delete();
                 }
                 if (!$cinada) {
                     $cin = Checkin::create(array('kso_id' => $ksoinfo->id, 'fleet_id' => $schedule->fleet_id, 'driver_id' => $scheduledate->driver_id, 'checkin_time' => date('Y-m-d H:i:s', Myfungsi::sysdate()), 'shift_id' => $scheduledate->shift_id, 'km_fleet' => 0, 'rit' => 0, 'incomekm' => 0, 'operasi_time' => date('Y-m-d', $dateopertion), 'pool_id' => Auth::user()->pool_id, 'operasi_status_id' => $codeops, 'fg_late' => '', 'checkin_step_id' => 2, 'document_check_user_id' => Auth::user()->id, 'physic_check_user_id' => '', 'bengkel_check_user_id' => '', 'finance_check_user_id' => '', 'keterangan' => $keterangan));
                     if ($cin) {
                         $docs = new Checkindocument();
                         $docs->checkin_id = $cin->id;
                         $docs->save();
                         //return Redirect::to('schedule');
                     }
                     //
                 }
             }
         }
         return Redirect::to('schedule');
     }
 }
开发者ID:acmadi,项目名称:diantaksi,代码行数:67,代码来源:tools.php

示例9: getLastPlayableVideoDuration

 public function getLastPlayableVideoDuration()
 {
     $videostoShow = array();
     $currentTime = date('h:i:s A');
     $today = date("Y-m-d");
     $videoCounter = 0;
     $timestamp = 0;
     // dd(new DateTime('today'));
     $activeSchedule = Schedule::where('active', '=', '1')->where('start_date', '<=', $today)->where('end_date', '>=', $today)->first();
     //dd($activeSchedule);
     if ($activeSchedule) {
         /*$videoList      =   Videos::where('schedule_id','=',$activeSchedule->id)
           ->where('active','=', '1')
           ->orderBy('position')->get();*/
         $videoList = DB::select(DB::raw('select * from `videolist` where `schedule_id` = ' . $activeSchedule->id . ' and `active` = \'1\' ORDER BY STR_TO_DATE(time, \'%h:%i:%s\') desc LIMIT 1'));
     } else {
         $videoList = [];
     }
     if (empty($videoList)) {
         $videostoShow[] = array('videoId' => null, 'startsAt' => null, 'endsAt' => null);
     } else {
         $datetimepickers = date('m/d/Y h:i:s a', strtotime($videoList[0]->time));
         //dd($videoList[0]);
         $videostoShow[] = array('videoId' => $videoList[0]->id, 'startsAt' => date('U', strtotime($today . ' ' . $videoList[0]->time)), 'endsAt' => date('U', strtotime($videoList[0]->time) + $videoList[0]->length + 1));
     }
     return $videostoShow;
 }
开发者ID:arizawan,项目名称:livetvwithyoutube,代码行数:27,代码来源:Videos.php

示例10: getMenuData

 protected function getMenuData()
 {
     $menu_data = array();
     $row = Practiceinfo::find(Session::get('practice_id'));
     $menu_data['mtm'] = $row->mtm_extension;
     $menu_data['id'] = Session::get('pid');
     $row1 = Encounters::where('pid', '=', Session::get('pid'))->where('eid', '!=', '')->where('practice_id', '=', Session::get('practice_id'))->orderBy('eid', 'desc')->first();
     if ($row1) {
         $menu_data['lastvisit'] = date('F jS, Y', strtotime($row1->encounter_DOS));
     } else {
         $menu_data['lastvisit'] = "No previous visits.";
     }
     $row2 = Schedule::where('pid', '=', Session::get('pid'))->where('start', '>', time())->first();
     if (isset($row2->start)) {
         $menu_data['nextvisit'] = '<br>' . date('F jS, Y, g:i A', $row2->start);
     } else {
         $menu_data['nextvisit'] = 'None.';
     }
     $row3 = Encounters::where('pid', '=', Session::get('pid'))->where('eid', '!=', '')->where('practice_id', '=', Session::get('practice_id'))->where('encounter_template', '=', 'standardpsych')->where('addendum', '=', 'n')->orderBy('eid', 'desc')->first();
     if ($row3) {
         $psych_date = strtotime($row3->encounter_DOS);
         $new_psych_date = $psych_date + 31556926;
         $psych_query = Encounters::where('pid', '=', Session::get('pid'))->where('eid', '!=', '')->where('practice_id', '=', Session::get('practice_id'))->where('addendum', '=', 'n')->where(function ($query_array1) {
             $query_array1->where('encounter_template', '=', 'standardpsych')->orWhere('encounter_template', '=', 'standardpsych1');
         })->orderBy('eid', 'desc')->get();
         $tp_date = '';
         if ($psych_query) {
             $i = 0;
             $psych_comp = '';
             $psych_comp1 = '';
             $tp_eid = '';
             foreach ($psych_query as $psych_row) {
                 $planInfo = Plan::find($psych_row->eid);
                 if ($planInfo) {
                     if ($i == 0) {
                         $psych_comp = $planInfo->goals;
                         $psych_comp .= $planInfo->tp;
                         $tp_eid = $psych_row->eid;
                         $tp_eid1 = $tp_eid;
                     } else {
                         $psych_comp1 = $planInfo->goals;
                         $psych_comp1 .= $planInfo->tp;
                         $tp_eid1 = $psych_row->eid;
                     }
                     if ($psych_comp1 != $psych_comp && $i != 0) {
                         $tp = DB::table('encounters')->where('eid', '=', $tp_eid)->first();
                         $tp_date = '<strong>Most recent TP adjustment:</strong> ' . date('F jS, Y', strtotime($tp->encounter_DOS)) . '<br>';
                         break;
                     } else {
                         $i++;
                         $tp_eid = $tp_eid1;
                     }
                 }
             }
         }
         $menu_data['psych'] = '<strong>Last Annual Psychiatric Eval:</strong> ' . date('F jS, Y', $psych_date) . '<br><strong>Next Annual Psychiatric Eval Due:</strong> ' . date('F jS, Y', $new_psych_date) . '<br>' . $tp_date;
     } else {
         $menu_data['psych'] = '';
     }
     $menu_data['supplements'] = $row->supplements_menu_item;
     $menu_data['immunizations'] = $row->immunizations_menu_item;
     return $menu_data;
 }
开发者ID:kylenave,项目名称:nosh-core,代码行数:63,代码来源:BaseController.php

示例11: date

            <table class="table table-condensed table-bordered table-striped table-small">
           		{{-- loop group in pool --}}
           		@forelse( Schedulegroup::where('schedule_master_id','=',$master->id)->where('pool_id','=',Auth::user()->pool_id)->get() as $group )	
           		<tr>
	                <td class="span2"><span class="label">Group #{{ $group->group }} </span> <a class="delete_toggler btn btn-mini btn-danger" rel="{{ $group->id }}"> Delete </a></td>
	                <td class="span8">
	                	{{-- loop fleet in group --}}
	                	@foreach(Schedulefleetgroup::where('schedule_group_id','=', $group->id )->get() as $fleet)
                    <?php 
$fleetz = Fleet::find($fleet->fleet_id);
?>
	
                      @if($fleetz)
  	                		<span class="label label-info">{{ $fleetz->taxi_number }}</span> 
                        <?php 
$x = Schedule::where('fleet_id', '=', $fleet->fleet_id)->where('year', '=', date('Y', time()))->order_by('month', 'desc')->first();
if ($x) {
    echo 'Last Generate: ';
    echo '<span class="label label-info">';
    echo MyFungsi::bulan($x->month);
    echo '</span>';
}
?>
                      @endif
	                	@endforeach
	                </td>
	                <td class="span2"><a class="label label-info" href="{{URL::to('schedule/create')}}?id={{$group->id}}"> Create Jadwal </a></td>
            	</tr>
            	@empty

            	<tr> <td> Tidak ada armada di master kepang ini </td> </tr>
开发者ID:acmadi,项目名称:diantaksi,代码行数:31,代码来源:group.blade.php

示例12:

                                  <div class="form-group">
                                      <label class="col-sm-2 col-sm-2 control-label">Name</label>
                                      <div class="col-sm-10">
                                          <input type="text" class="form-control" name="name" id="vidname" value="{{$video->name}}">
                                      </div>
                                  </div>

                                  <div class="form-group">
                                      <label class="col-sm-2 col-sm-2 control-label">Select Schedule</label>
                                      <div class="col-sm-10">
                                          <select class="form-control" name="schedule_id">
                                              <option>Select...</option>
                                              @foreach (Schedule::get() as $schedule)
                                                  <?php 
$SelectedSchedule = Schedule::where('id', '=', $video->schedule_id)->first();
if ($SelectedSchedule->id == $schedule->id) {
    ?>
                                                        <option value="{{$schedule->id}}" selected="selected">{{$schedule->name}}</option>
                                                  <?php 
} else {
    ?>
                                                        <option value="{{$schedule->id}}">{{$schedule->name}}</option>
                                                  <?php 
}
?>

                                              @endforeach
                                          </select>
                                      </div>
                                  </div>
开发者ID:arizawan,项目名称:livetvwithyoutube,代码行数:30,代码来源:editvideo.blade.php

示例13: insert_schedules

 protected function insert_schedules()
 {
     $doctors = Doctor::all();
     foreach ($doctors as $doctor) {
         $count = rand(300, 500);
         while ($count--) {
             $date = $this->get_random_date();
             $schedules = Schedule::where('date', $date)->where('doctor_id', $doctor->id)->get();
             if ($schedules->count()) {
                 continue;
             }
             // 添加早上排班
             if (rand(0, 1)) {
                 Schedule::create(['date' => $date, 'period' => 0, 'doctor_id' => $doctor->id]);
             }
             // 添加下午排班
             if (rand(0, 1)) {
                 Schedule::create(['date' => $date, 'period' => 1, 'doctor_id' => $doctor->id]);
             }
         }
     }
 }
开发者ID:Jv-Juven,项目名称:hospital-register-system,代码行数:22,代码来源:InsertTestDataCommand.php

示例14: updateTemplates

 /**
  * Updates all existing templates with changes provided.
  *
  * @return view templateManagementView
  */
 public function updateTemplates()
 {
     $templates = Schedule::where('schdl_is_template', '=', '1')->orderBy('schdl_title', 'ASC')->get();
     foreach ($templates as $template) {
         if (Input::get('destroy' . $template->id)) {
             // remove from the list of templates, but don't touch corrsponding event/schedule
             $template->schdl_is_template = 0;
             $template->save();
         } else {
             // update title
             $template->schdl_title = Input::get('schdl_title' . $template->id);
             $template->save();
         }
     }
     // need to update our index after the changes
     $templates = Schedule::where('schdl_is_template', '=', '1')->with('getClubEvent')->orderBy('schdl_title', 'ASC')->get();
     return View::make('templateManagementView', compact('templates'));
 }
开发者ID:gitter-badger,项目名称:lara-vedst,代码行数:23,代码来源:ManagementController.php

示例15: postsCalendar

 public function postsCalendar()
 {
     $user_id = Auth::user()->id;
     $networks = Network::where('user_id', '=', $user_id)->get();
     $settings = Settings::where('user_id', '=', $user_id)->first();
     $default_networks = json_decode($settings->default_networks);
     $schedules = Schedule::where('user_id', '=', $user_id)->get();
     $custom_schedule_checked = '';
     $default_schedule = $settings->schedule_id;
     $page_data = array('networks' => $networks, 'default_networks' => $default_networks, 'default_schedule' => $default_schedule, 'schedules' => $schedules, 'custom_schedule_checked' => $custom_schedule_checked);
     $this->layout->title = 'Posts';
     $this->layout->handlebars = true;
     $this->layout->posts = true;
     $this->layout->posts_calendar = true;
     $this->layout->new_post = true;
     $this->layout->content = View::make('admin.posts_calendar', $page_data);
 }
开发者ID:anchetaWern,项目名称:ahead,代码行数:17,代码来源:PostController.php


注:本文中的Schedule::where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。