-
Modules/Article/Http/Requests/Backend/CategoriesRequest.php
Open in GitHubuse Illuminate\Foundation\Http\FormRequest; class CategoriesRequest extends FormRequest { public function authorize() { return true; } public function rules() { return [ 'name' => 'required|max:191|unique:categories,name,'.$this->category, 'slug' => 'nullable|max:191|unique:categories,slug,'.$this->category, ]; } }