lundi 11 novembre 2019

How do you check two conditions for current route laravel 5.7 blade template?

Im trying to pass a condition with a logical OR on blade view where I can display a div tag, Whenever either of the two conditions becomes true.

@if(\Route::current()->getName() != 'this_route' or \Route::current()->getName() != 'other_route')
      <div>Display when is true</div>
    @endif 

OR

@if(\Route::current()->getName() != 'this_route' || \Route::current()->getName() != 'other_route')
          <div>Display when is true</div>
        @endif

Both above codes do not work for me



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire