app/Http/Requests/AuthMlOpenidStoreRequest.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 [
            'code'=>'required',
            'ref_code'=>[
                },
            ]
        ];
    }
public function rules ( ) { return [ 'code' => 'required' , 'ref_code' => [ ] ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .
//                function ($attribute, $value, $fail) { //                    if (!User::where('ref_code',$value)->first()) { //                        return $fail('邀请码不存在！'); //                    } // //                },