25 lines
563 B
PHP
25 lines
563 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Dashboard;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateArtworkRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
// Authorization is enforced in the controller via ArtworkPolicy.
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'title' => 'required|string|max:150',
|
|
'description' => 'nullable|string',
|
|
// 100MB max (Laravel uses kilobytes)
|
|
'file' => 'nullable|image|max:102400',
|
|
];
|
|
}
|
|
}
|