parsaaghayi-backend/app/Http/Requests/Blog/StoreCategoryRequest.php
parsa aghaei a5f76a3657
Some checks failed
Deploy Backend / deploy (push) Has been cancelled
0.1: replace Request with FormRequest in all controllers
2026-06-23 18:04:57 +03:30

25 lines
570 B
PHP

<?php
namespace App\Http\Requests\Blog;
use Illuminate\Foundation\Http\FormRequest;
class StoreCategoryRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'name' => 'required|string|max:255|unique:categories,name',
'slug' => 'required|string|unique:categories,slug',
'description' => 'required|string',
'short_description' => 'nullable|string|max:500',
'image' => 'nullable|url',
];
}
}