Could someone explain me why I get blank screen with printed string "@extends('layouts.default')" if I request page normally (not ajax)?
@if(!Request::ajax())
@extends('layouts.default')
@section('content')
@endif
Test
@if(!Request::ajax())
@stop
@endif
I'm trying to solve problem with Ajax, I don't want to create 2 templates for each request type and also I do want to use blade templates, so using controller layouts doesn't work for me. How can I do it in blade template? I was looking at this Laravel: how to render only one section of a template?
By the way. If I request it with ajax it works like it should.