本文整理汇总了PHP中Notify::successs方法的典型用法代码示例。如果您正苦于以下问题:PHP Notify::successs方法的具体用法?PHP Notify::successs怎么用?PHP Notify::successs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notify
的用法示例。
在下文中一共展示了Notify::successs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
Route::post('admin/departments/edit/(:num)', function ($id) {
$input = Input::get(array('title', 'slug', 'description'));
$validator = new validator($input);
$validator->check('title')->is_max(3, __('departments.title_missing'));
if ($errors = $validator->errors()) {
Input::flash();
Notify::error($errors);
return Response::redirect('admin/departments/edit/' . $id);
}
if (empty($input['slug'])) {
$input['slug'] = $input['title'];
}
$input['slug'] = slug($input['slug']);
department::update($id, $input);
Extend::process('department', $id);
Notify::successs(__('departments.update'));
return Response::redirect('admin/departments/edit/' . $id);
});
Route::get('admin/departments/add', function () {
$vars['messages'] = Notify::read();
$vars['token'] = Csrf::token();
$vars['fields'] = Extend::fields('department');
return View::create('departments/add', $vars)->partial('header', 'partials/header')->partial('footer', 'partials/footer');
});
Route::post('admin/departments/add', function () {
$input = Input::get(array('title', 'slug', 'description'));
$validator = new validator($input);
$validator->check('title')->is_max(3, __('departments.title_missing'));
if ($errors = $validator->errors()) {
Input::flash();
Notify::error($errors);
示例2: function
Route::post('admin/companies/edit/(:num)', function ($id) {
$input = Input::get(array('title', 'slug', 'description'));
$validator = new validator($input);
$validator->check('title')->is_max(3, __('companies.title_missing'));
if ($errors = $validator->errors()) {
Input::flash();
Notify::error($errors);
return Response::redirect('admin/companies/edit/' . $id);
}
if (empty($input['slug'])) {
$input['slug'] = $input['title'];
}
$input['slug'] = slug($input['slug']);
Company::update($id, $input);
Extend::process('company', $id);
Notify::successs(__('companies.update'));
return Response::redirect('admin/companies/edit/' . $id);
});
Route::get('admin/companies/add', function () {
$vars['messages'] = Notify::read();
$vars['token'] = Csrf::token();
$vars['fields'] = Extend::fields('company');
return View::create('companies/add', $vars)->partial('header', 'partials/header')->partial('footer', 'partials/footer');
});
Route::post('admin/companies/add', function () {
$input = Input::get(array('title', 'slug', 'description'));
$validator = new validator($input);
$validator->check('title')->is_max(3, __('companies.title_missing'));
if ($errors = $validator->errors()) {
Input::flash();
Notify::error($errors);