php - Laravel Blade how to use if statement for null or empty -


in blade templating engine, how use "if" determine null or empty?

{{{ auth::user()->age }}}

you can bellow

    @if (empty(auth::user()->age))       // if code     @else      //  else code     @endif 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -