src/controllers/PermissionController.php
public function putShow($permissionId)
    {
        try {
            $validator = new PermissionValidator(Input::all());
            if(!$validator->passes()) {
                return Response::json(array('permissionUpdated' => false, 'errorMessages' => $validator->getErrors()));
            }

            // Find the permission using the permission id
            $permission = PermissionProvider::findById($permissionId);
            $permission->fill(Input::all());

            // Update the permission
            if($permission->save()) {
                return Response::json(array('permissionUpdated' => true, 'message' => trans('syntara::permissions.messages.update-success'), 'messageType' => 'success'));
            } else {
                return Response::json(array('permissionUpdated' => false, 'message' => trans('syntara::permissions.messages.update-fail'), 'messageType' => 'danger'));
            }
        } catch (\MrJuliuss\Syntara\Models\Permissions\PermissionExistsException $e) {
            return Response::json(array('permissionUpdated' => false, 'message' => trans('syntara::permissions.messages.exists'), 'messageType' => 'danger'));
        }
    }
public function putShow($permissionId)
    {
        try {
            $validator = new PermissionValidator(Input::all());
            if(!$validator->passes()) {
                return Response::json(array('permissionUpdated' => false, 'errorMessages' => $validator->getErrors()));
            }

            // Find the permission using the permission id
            $permission = PermissionProvider::findById($permissionId);
            $permission->fill(Input::all());

            // Update the permission
            if($permission->save()) {
                return Response::json(array('permissionUpdated' => true, 'message' => trans('syntara::permissions.messages.update-success'), 'messageType' => 'success'));
            } else {
                return Response::json(array('permissionUpdated' => false, 'message' => trans('syntara::permissions.messages.update-fail'), 'messageType' => 'danger'));
            }
        } catch (\MrJuliuss\Syntara\Models\Permissions\PermissionExistsException $e) {
            return Response::json(array('permissionUpdated' => false, 'message' => trans('syntara::permissions.messages.exists'), 'messageType' => 'danger'));
        }
    }
Update permission
@param int $permissionId
@return Response