cms/app/Http/Requests/Admin/Pages/StorePageRequest.php

30 lines
659 B
PHP
Raw Normal View History

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