polarpress-pagebuilder/app/Http/Requests/Backend/PageBuilder/SetActiveRequest.php
Helge-Mikael Nordgård b1e031376f
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
Backend Pagebuilder Controller + Request Classes
2025-05-05 15:30:43 +02:00

32 lines
764 B
PHP

<?php
namespace App\Http\Requests\Backend\PageBuilder;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
class SetActiveRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool {
if (Auth::check())
return true;
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array {
return [
'title' => ['required', 'string', 'max:255'],
'content' => ['required', 'json']
];
}
}