2

I know this seems like an answered question, but it is not (I hope).

What I looking for is a way to extends or NOT a view: if the request is an ajax call the view does not extends nothing. Something like:

@if(!Request::ajax())

    @extends('navbar')

       @section('home')
          <div>"my content"</div>
       @stop

@else

    <div>"my content"</div>

@endif

This is NOT what I looking for:

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

I mean if the request is an ajax call, I want the view do not extend nothing.

Hope to be clear.

Thx!

jww
  • 97,681
  • 90
  • 411
  • 885
ciccioassenza
  • 233
  • 1
  • 7
  • 17

1 Answers1

0

Solved using the @include statement

ciccioassenza
  • 233
  • 1
  • 7
  • 17