public function onSave($model)
    {
        $apiRoles          = ApiRoles::firstOrNew(['role_id' => $model->id]);
        $apiRoles->enabled = (int) Input::get('enabled');
        try {
            $apiRoles->save();
        } catch (Exception $ex) {
            Log::emergency($ex);
            throw new Exception('Unable to save role.');
        }
    }
public function onSave($model)
    {
        $apiRoles          = ApiRoles::firstOrNew(['role_id' => $model->id]);
        $apiRoles->enabled = (int) Input::get('enabled');
        try {
            $apiRoles->save();
        } catch (Exception $ex) {
            Log::emergency($ex);
            throw new Exception('Unable to save role.');
        }
    }
public function onSave ( $ model ) { $ apiRoles = ApiRoles :: firstOrNew ( [ 'role_id' => $ model -> id ] ) ; $ apiRoles -> enabled = ( int ) Input :: get ( 'enabled' ) ; try { $ apiRoles -> save ( ) ; } catch ( Exception $ ex ) { Log :: emergency ( $ ex ) ; throw new Exception ( 'Unable to save role.' ) ; } }
fires on save role

@param Model $model
@throws Exception
fires on save role