本文整理匯總了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'));