laravel - Blade conditional extends -


i know seems answered question, not (i hope).

what looking way extends or not view: if request ajax call view not extends nothing. like:

@if(!request::ajax())      @extends('navbar')         @section('home')           <div>"my content"</div>        @stop  @else      <div>"my content"</div>  @endif 

this not looking for:

@extends((( request::ajax()) ? 'layouts.ajax' : 'layouts.default' )) 

i mean if request ajax call, want view not extend nothing.

hope clear.

thx!

solved using @include statement


Comments

Popular posts from this blog

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World