src/Stevemo/Cpanel/Controllers/UsersController.php
public function putDeactivate($id)
    {
        try
        {
            $this->users->deactivate($id);
            return Redirect::route('cpanel.users.index')
                ->with('success',Lang::get('cpanel::users.deactivation_success'));
        }
        catch (UserNotFoundException $e)
        {
            return Redirect::route('cpanel.users.index')
                ->with('error',$e->getMessage());
        }
    }
public function putDeactivate($id)
    {
        try
        {
            $this->users->deactivate($id);
            return Redirect::route('cpanel.users.index')
                ->with('success',Lang::get('cpanel::users.deactivation_success'));
        }
        catch (UserNotFoundException $e)
        {
            return Redirect::route('cpanel.users.index')
                ->with('error',$e->getMessage());
        }
    }
public function putDeactivate ( $ id ) { try { $ this -> users -> deactivate ( $ id ) ; return Redirect :: route ( 'cpanel.users.index' ) -> with ( 'success' , Lang :: get ( 'cpanel::users.deactivation_success' ) ) ; } catch ( UserNotFoundException $ e ) { return Redirect :: route ( 'cpanel.users.index' ) -> with ( 'error' , $ e -> getMessage ( ) ) ; } }
deactivate a user

@author Steve Montambeault
@link   http://stevemo.ca

@param $id

@return \Illuminate\Http\RedirectResponse
deactivate a user