0.1: replace Request with FormRequest in all controllers
Deploy Backend / deploy (push) Has been cancelled
Deploy Backend / deploy (push) Has been cancelled
This commit is contained in:
1 parent
b7e85f80f7
commit
a5f76a3657
15 files changed
+277
-107
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Website;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateProjectRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'category_id' => 'sometimes|required|exists:website_project_categories,id',
|
||||
'image1' => 'sometimes|required|string|max:255',
|
||||
'image2' => 'sometimes|required|string|max:255',
|
||||
'title_fa' => 'sometimes|required|string|max:255',
|
||||
'title_en' => 'sometimes|required|string|max:255',
|
||||
'description_fa' => 'sometimes|required|string',
|
||||
'description_en' => 'sometimes|required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user