本文整理汇总了PHP中Schedule::changeStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Schedule::changeStatus方法的具体用法?PHP Schedule::changeStatus怎么用?PHP Schedule::changeStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Schedule
的用法示例。
在下文中一共展示了Schedule::changeStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postChangestatusshedule
public function postChangestatusshedule()
{
$data = Input::only('status', 'schedule_id', 'updatedby');
$scObj = new Schedule();
$update = $scObj->changeStatus($data['schedule_id'], $data['status'], $data['updatedby']);
if ($update) {
return Response::json(array('status' => '1', $data));
} else {
return Response::json(array('status' => '0', $data));
}
}
示例2: function
Route::group(array('before' => 'admin.login', 'prefix' => 'admin/schedules'), function () {
# Admin Schedules
Route::get('/', function () {
$schedules = Schedule::get();
return View::make('backend.schedules')->with('schedules', $schedules);
});
# Admin Add Schedules;
Route::get('/add', function () {
$user = Sentry::getUser();
return View::make('backend.addschedules')->with('user', $user);
});
# Admin Status Change Schedules;
Route::get('/status/{status}/{id}', function ($status, $id) {
$user = Sentry::getUser();
$scObj = new Schedule();
$update = $scObj->changeStatus($id, $status, $user->id);
$schedules = Schedule::get();
return View::make('backend.schedules')->with('schedules', $schedules);
});
# Admin Delete Schedules;
Route::get('/delete/{id}', function ($id) {
$scObj = Schedule::find($id);
//dd($scObj);
$delobj = $scObj->delete();
if ($delobj) {
echo 1;
} else {
echo 0;
}
});
Route::post('/add', array('uses' => 'RainTvController@postNewshedule'));