我有一个奇怪的刀片问题。
我有一个正在渲染的编辑刀片,但不是主刀片。Debugbar显示正在显示两个视图(master和delete)。他们不是!
与master一起使用的其他刀片均可工作。我尝试复制这些刀片并插入特定数据,但都无济于事。
我已经在浏览器中清除了历史记录,并完成了php artisan cache:clear。没什么。
Master Blade适用于所有其他渲染。以下是详细信息:
<div class="intro">
<section>
@yield('intro')
</section>
</div>此刀片工作,并使用母版进行渲染:
@extends('layouts.master')
@section('title')
Your Profile
@stop
@section('head')
@stop
@section('intro')
<div class="output">
<h2>Your Pets</h2>
<div>
</div>
@if(sizeof($pets) == 0)
No pets
@else
@foreach($pets as $pet)
<div class="p1">
<h3>{{ $pet->petName }}</h3>
<p><img src='{{ $pet->photo }}' width="200px" height="200px"></p>
<p>{{ $pet->breed }}</p>
<a href='/profile/edit/{{$pet->id}}'>Edit</a> |
<a href='/profile/confirm-delete/{{$pet->id}}'>Delete</a>
</div>
@endforeach
@endif
</div>
@stop
@section('body')
@stop此刀片渲染,但没有母版!Debugbar说两个视图都在渲染。哈!
@extends('layouts.master')
@section('title')
Delete Your Pet
@stop
@section('head')
@stop
@section('intro')
<div class="output">
<h1>Delete Pet</h1>
<p>
Are you sure you want to delete <em>{{$pets->petName}}</em>?
</p>
<p>
<a href='/profile/delete/{{$pets->id}}'>Yes...</a>
</p>
</div>
@stop
@section('body')
@stop有人看过这个吗?
发布于 2015-12-11 03:36:21
从5.1版本开始,@stop已经从文档中删除了,所以我猜它可能不再受支持。请改用@endsection。
https://stackoverflow.com/questions/34204500
复制相似问题