title: How can I represented multiple if else condition in single line on laravel blade?
body: <p>Now I am Trying To Using This Code For Multi Menu Pages Link Building</p>
  
  <pre><code>&lt;ul&gt;
    @foreach($main_nav as $mainMenu)
      @if($mainMenu-&gt;page_type == "link-page")
          $link = $mainMenu-&gt;link;
      @elseif($mainMenu-&gt;page_type == "predefine-link")
          $link = route('home').'/'.$mainMenu-&gt;link;
      @else
          $link = 'page/'.$mainMenu-&gt;slug;
      @endif
  
      &lt;li&gt;
          &lt;a href="{{ $link }}"&gt;
              {{ $mainMenu-&gt;title  }}
          &lt;/a&gt; 
      &lt;/li&gt;
    @endforeach
  &lt;/ul&gt;
  </code></pre>
  
  <p>But I Want To Represente Above Code for Single Line on Laravel Blade. I have a idea for isset('')?'':'' for single line but my condition is repeated 3 times so how can I represent multiple if else condition on single line in this format. </p>
  
  <pre><code>&lt;ul&gt;   
      @foreach($main_nav as $mainMenu)    
          &lt;li&gt;
              &lt;a href="{{  $mainMenu-&gt;page_type == "link-page" ? "$mainMenu-&gt;link" : route('home').'/'.$mainMenu-&gt;link }}"&gt;
                  {{ $mainMenu-&gt;title  }}
              &lt;/a&gt; 
          &lt;/li&gt;   
       @endforeach 
  &lt;/ul&gt;
  </code></pre>