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

32 lines
571 B
PHP
Raw Normal View History

2021-12-13 16:55:12 +01:00
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
2021-12-15 10:09:39 +01:00
class StoreTextRequest extends FormRequest
2021-12-13 16:55:12 +01:00
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return auth()->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
2021-12-15 10:09:39 +01:00
'title' => 'required|max:255',
'text' => 'required|max:2047',
2021-12-13 16:55:12 +01:00
];
}
}