1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace Packages\Product\Http\Requests;
- use Illuminate\Foundation\Http\FormRequest;
- use Illuminate\Validation\Rule;
- class ProductRequest extends FormRequest
- {
- /**
- * 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 [
- 'title' => ['required','max:100'],
- 'price' => ['required'],
- 'slug' => ['unique:products'],
- 'type' => ['required'],
- 'status' => ['required'],
- 'discription' => ['required'],
- 'categories' => ['required'],
- 'featureDescription' => ['nullable'],
- 'featureCaption' => ['nullable'],
- 'descriptionImg' => ['nullable'],
- 'parent_type' =>['nullable'],
- ];
- }
- }
|