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

33 lines
686 B
PHP
Raw Permalink 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 StorePictoRequest extends FormRequest
2021-12-13 16:55:12 +01:00
{
/**
* 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 [
2021-12-15 10:09:39 +01:00
'picture' => 'sometimes|image|mimes:png|max:512|dimensions:max_width=150,max_height=150',
2021-12-20 14:02:37 +01:00
'alt_text_picture' => 'required|max:255',
2021-12-13 16:55:12 +01:00
'text' => 'required|max:50',
];
}
}