Edmond Tamas Edmond Tamas - 1 year ago 164
PHP Question

Laravel @include into master layout results in: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

I am trying to include into my master.blade.php a top.blade.php file, but I end up with this error:

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted
(tried to allocate 16384 bytes) in
on line 534

Maybe I am doing something wrong?


Route::get('/', function () {
return view('home');


<!-- Stored in resources/views/ -->


<p>This is my body content.</p>


<!-- Stored in resources/views/ -->


<div class="right col-md-4 pull-right">
<span class="phone"><span class="glyphicon glyphicon-earphone"></span> 0743 443.566</span>
<span class="text-right" data-toggle="modal" data-target="#loginModal"><span class="fa fa-shopping-cart"></span>COSUL</span>
<div class="left col-md-8 hidden-xs">
<span class="label label-warning">PROMOTII</span><span class="promo_1"> Promotii speciale de weekend!</span>


<!-- Stored in resources/views/layouts/master.blade.php -->


<div class="top">
<div class="container">

<div class="foo">


Answer Source

This is what you are doing: top extends master and master include top => cause never-end include => cause Memory error.

Solution: Remove




From your top.blade.php. That's it

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download