Van1310
264
4
Laravel

if condition check value

Posted 3 months ago by Van1310

if $amount is less than $charges than return true otherwise false

public function paymentstore(Request $request,$id)

{

    $charges=Registration::where('id','=',$id)->pluck('charges');        


    if($request->get('amount') <= $charges)

    {

        return "true";

    }

    else

    {

        return "false";

    }

}

Please sign in or create an account to participate in this conversation.