我需要你的帮助,因为当我尝试扩展另一个扩展模板时出现此错误。
Maximum function nesting level of '100' reached, aborting!
编剧/ dashboard.blade.php
@extends('user.dashboard')
@section('writer-dashboard')
<li><a href="#"><i class="glyphicon glyphicon-calendar"></i>Calendrier</a></li>
@endsection
用户/ dashboard.blade.php
@extends('layouts.app') @section('content') <div class="row dashboard"> <aside class="col-xs-12 col-lg-2 content-box-large"> <ul class="nav"> <li class="current"><a href="#"><i class="glyphicon glyphicon-home"></i>Dashboard</a></li> <li><a href="#"><i class="fa fa-user"></i>Profil</a></li> <li><a href="#"><i class="fa fa-graduation-cap"></i>Cours</a></li> @yield('writer-dashboard') </ul> </aside> @endsection
布局/ app.blade.php
<!doctype html> <html lang="fr"> <head> </head> <body> @yield('content') </body> </html>
答案 0 :(得分:1)
你正在创造无限循环。检查:
在dashboard.blade.php
中,您为writer-dashboard
模板获得了收益。该模板再次调用仪表板和仪表板再次调用writer-dashboard。
使用@yield
而不是@include
指令。寻找Including Sub-Views in Control Structures' section.