app/Http/Requests/SubCateRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'cate_bags'             => 'required|array|min:1',                              
            'cate_bags.*.cate_name' => 'required|string|max:100',                           
            'cate_bags.*.cate_abbr' => 'required|string|max:10',                            
            'cate_bags.*.cate_stat' => 'required_without:edit|in:0,1',                      
            'cate_imag'             => 'required_without:edit|mimes:jpg,jpeg,png',          
            'main_cate'             => 'required|exists:main_cates,id',                     
        ];
    }
public function rules ( ) { return [ 'cate_bags' => 'required|array|min:1' , 'cate_bags.*.cate_name' => 'required|string|max:100' , 'cate_bags.*.cate_abbr' => 'required|string|max:10' , 'cate_bags.*.cate_stat' => 'required_without:edit|in:0,1' , 'cate_imag' => 'required_without:edit|mimes:jpg,jpeg,png' , 'main_cate' => 'required|exists:main_cates,id' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .
// SUB CATEGORIES VALIDATION RULES OF CREATE AND EDIT FORMS // SUB CATEGORY ARRAY OF OBJECTS // SUB CATEGORY NAMES // SUB CATEGORY ABBREVIATIONS // SUB CATEGORY STATUSES // SUB CATEGORY IMAGE // SUB CATEGORY RELATED MAIN CATEGORY