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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -