cms/app/Http/Requests/Admin/Roles/DestroyRoleRequest.php

32 lines
649 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Http\Requests\Admin\Roles;
use Illuminate\Foundation\Http\FormRequest;
/**
* Request for deleting a role.
*/
class DestroyRoleRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize(): bool
{
return $this->user()->hasPermission('delete-roles');
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [];
}
}