ldc-doux/app/Http/Requests/UpdateTitleRequest.php

32 lines
577 B
PHP
Raw Normal View History

2021-12-13 16:55:12 +01:00
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateTitleRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
2022-08-11 12:34:27 +02:00
* @return boolean
2021-12-13 16:55:12 +01:00
*/
public function authorize()
{
return auth()->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'title' => 'required|max:50',
'text' => 'sometimes:|max:2047',
];
}
}