Home > OS >  How can I use conditional expression in html to control the display?
How can I use conditional expression in html to control the display?

Time:12-16

I want to put the following conditional expression in html to control the display in blade in laravel, but I can't get to "$response.ResultCode". How can I do this?

@if ($response.ResultCode == "0000")
<HTML content>
@endif

In js, I am able to access as follows.

if(@json($response).ResultCode ! = "0000") {
   hoge;     
}

CodePudding user response:

you can use access operator for this

$response->ResultCode
  • Related