current state
This commit is contained in:
24
app/Http/Requests/Dashboard/UpdateArtworkRequest.php
Normal file
24
app/Http/Requests/Dashboard/UpdateArtworkRequest.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user