%PDF- %PDF-
Direktori : /var/www/html/news/app/Http/Requests/Category/ |
Current File : /var/www/html/news/app/Http/Requests/Category/CategoryStoreRequest.php |
<?php namespace App\Http\Requests\Category; use App\Http\Requests\BaseRequest; class CategoryStoreRequest extends BaseRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'name' => 'required|string|unique:categories,name', 'description' => 'required|string', 'parent_id' => 'nullable|integer|exists:categories,id' ]; } public function getSanitationRules() { return []; } }