cms/app/Http/Requests/Admin/Themes/AccessThemeEditorRequest.php

32 lines
666 B
PHP
Raw Permalink Normal View History

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