I'm using L4 with Blade. I'd like to be able to conditionally extend a layout. For normal use, I'd like to extend the master layout, and for ajax renders, I'd like to be able to extend the ajax template. I use the following code:
@if ( isset($ajax) )
@extends('layouts.ajax')
@else
@extends('layouts.master')
@endif
But when the page renders it just prints out @extend('layouts.master').
Does anyone know how to conditionally extend a layout or another?
Thanks