for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanesoft\Auth\Http\Requests\Admin\Roles;
/**
* Class UpdateRoleRequest
*
* @package Arcanesoft\Auth\Http\Requests\Admin\Roles
* @author ARCANEDEV <[email protected]>
*/
class UpdateRoleRequest extends RoleFormRequest
{
/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
* Determine if the user is authorized to make this request.
* @return bool
public function authorize()
return true;
}
* Get the validation rules that apply to the request.
* @return array
public function rules()
/** @var \Arcanesoft\Auth\Models\Role $role */
$role = $this->route('auth_role');
return array_merge(parent::rules(), [
'slug' => "required|min:3|unique:roles,slug,{$role->id}",
]);