app/Http/Requests/CategoryStore.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 [
            'category_prefix' => ['required',
                'string',
                new UniqueCaseInsensitive('categories', 'category_prefix', 'Prefix')],
            'category_name' => ['required',
                'string',
                new UniqueCaseInsensitive('categories', 'category_name', 'Category')]
        ];
    }
public function rules ( ) { return [ 'category_prefix' => [ 'required' , 'string' , new UniqueCaseInsensitive ( 'categories' , 'category_prefix' , 'Prefix' ) ] , 'category_name' => [ 'required' , 'string' , new UniqueCaseInsensitive ( 'categories' , 'category_name' , 'Category' ) ] ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .