app/Http/Requests/WithdrawalRequest.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 [
            'amount'=>['required',
                function ($attribute, $value, $fail) {
                    if(bccomp($value,Setting::where('key','withdrawal_low')->value('value'),  3)==-1) {
                        return $fail('最低提现'. Setting::where('key','withdrawal_low')->value('value'));
                    }
                }],
            'name'=>'required',
            'bank_of_deposit'=>'required',
            'bank_card_number'=>'required',
        ];
    }
public function rules ( ) { return [ 'amount' => [ 'required' , function ( $ attribute , $ value , $ fail ) { if ( bccomp ( $ value , Setting :: where ( 'key' , 'withdrawal_low' ) -> value ( 'value' ) , 3 ) == - 1 ) { return $ fail ( '最低提现'. Settin g :where( 'k ey',' w ithdr a wal_low')->value ( 'v alue' ) ); } } ] , 'name' => 'required' , 'bank_of_deposit' => 'required' , 'bank_card_number' => 'required' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .