Initial commit

This commit is contained in:
2026-09-03 12:21:17 +02:00
commit 6d40da0410
155 changed files with 21554 additions and 0 deletions
@@ -0,0 +1,39 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
/**
* Walidacja edycji urządzenia opomiarowania (site208E). Reguły jak przy
* dodawaniu; wgranie nowego pliku zastępuje dotychczasowy tej samej roli.
*/
class UpdateMeteringRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'manufacturer_id' => ['required', 'integer', 'exists:seg_manufacturers,MCF_ID'],
'description' => ['nullable', 'string', 'max:255'],
'catalogue_file' => ['nullable', 'file', 'mimes:pdf,doc,docx,xls,xlsx,ppt,pptx', 'max:8192'],
'image_file' => ['nullable', 'image', 'mimes:jpg,jpeg,png,gif,bmp', 'max:8192'],
];
}
public function attributes(): array
{
return [
'name' => 'nazwa',
'manufacturer_id' => 'producent',
'description' => 'opis',
'catalogue_file' => 'dokumentacja katalogowa',
'image_file' => 'zdjęcie',
];
}
}