I installed a bundle in my project that defines it's own views. While navigating through the site after making some changes, I found that all of my actions that happen with the bundled views work fine, but when I go back to the head route, I get an error message:
View [layouts.default] not found. (View: /var/www/app/views/home.blade.php)
The file app/views/home.blade.php
definitely exists. The closure for my head route looks like this:
Route::get('/', array('as' => 'home', function()
{
return View::make('home');
}));
What could have changed the structure of my views?
EDIT:
Here's the contents of my home.blade.php file:
@extends('layouts.default')
{{-- Web site Title --}}
@section('title')
@parent
{{trans('pages.helloworld')}}
@stop
{{-- Content --}}
@section('content')
<div class="jumbotron">
<div class="container">
<h1>{{trans('pages.helloworld')}}</h1>
<p>{{trans('pages.description')}}</p>
</div>
</div>
@if (Sentry::check() )
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title"><span class="glyphicon glyphicon-ok"></span> {{trans('pages.loginstatus')}}</h3>
</div>
<div class="panel-body">
<p><strong>{{trans('pages.sessiondata')}}:</strong></p>
<pre>{{ var_dump(Session::all()) }}</pre>
</div>
</div>
@endif
@stop
File layouts.default
does not exists.
See:
@extends('layouts.default')
First line.
What Laravel does it looks for a directory layouts
inside a views
directory and tries to load default
file inside. This file does not exist so the error occurs.
来源:https://stackoverflow.com/questions/23144197/laravel-view-layouts-default-not-found