0.1: replace Request with FormRequest in all controllers
Deploy Backend / deploy (push) Has been cancelled

This commit is contained in:
parsa aghaei committed 2026-06-23 18:04:57 +03:30
1 parent b7e85f80f7
commit a5f76a3657
15 files changed
+277 -107

No files matched your search

@@ -0,0 +1,26 @@
<?php
namespace App\Http\Requests\Blog;
use Illuminate\Foundation\Http\FormRequest;
class UpdateCategoryRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
$categoryId = $this->route('category');
return [
'name' => 'sometimes|required|string|max:255|unique:categories,name,' . $categoryId,
'slug' => 'sometimes|required|string|unique:categories,slug,' . $categoryId,
'description' => 'sometimes|required|string',
'short_description' => 'nullable|string|max:500',
'image' => 'nullable|url',
];
}
}