Add file upload function. modify paramiter FILESYSTEM_DISK=public in file .env

This commit is contained in:
paoloGuagnano
2024-02-21 17:29:21 +01:00
parent e6f3fcbb4e
commit cd9c380b58
12 changed files with 254 additions and 129 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateWordRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'name' => 'required|string',
'translation' => 'required|string',
];
}
public function messages(): array
{
return [
'name.required' => 'Insert italian Word',
'translation.required' => 'Insert dialect Word',
];
}
}