Stevemo\Cpanel\Controllers\UsersThrottlingController::putStatus PHP Method

putStatus() public method

Update the throttle status for a given user
Author: Steve Montambeault
public putStatus ( $id, $action ) : Illuminate\Http\RedirectResponse
$id
$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}]");
        }
    }
UsersThrottlingController