updateThrottleStatus() публичный Метод

Автор: Steve Montambeault
public updateThrottleStatus ( $id, $status ) : void
$id
$status
Результат void
Пример #1
0
 /**
  * Update the throttle status for a given user
  *
  * @author Steve Montambeault
  * @link   http://stevemo.ca
  *
  * @param $id
  * @param $action
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function putStatus($id, $action)
 {
     try {
         $this->users->updateThrottleStatus($id, $action);
         return Redirect::route('cpanel.users.index')->with('success', Lang::get('cpanel::throttle.success', array('action' => $action)));
     } catch (UserNotFoundException $e) {
         return Redirect::route('cpanel.users.index')->with('error', $e->getMessage());
     } catch (\BadMethodCallException $e) {
         return Redirect::route('cpanel.users.index')->with('error', "This method is not suported [{$action}]");
     }
 }