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

29 lines
627 B
PHP
Raw Normal View History

<?php
namespace App\Http\Requests\Admin\Roles;
use Illuminate\Foundation\Http\FormRequest;
class StoreRoleRequest extends BaseRoleRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize(): bool
{
return $this->user()->hasPermission('create-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 $this->baseRules();
}
}