I am currently working on my first project with laravel 5 and I have run into an issue. I have several @yield locations in my default layout page. Currently one does not work at all and none will utilize a blade tag.
part of default.blade.php which does not work at all:
<div class="col-md-6">
<div class="cart-info">
@yield('topname')
</div>
</div>
home.blade.php
@extends('_layouts.default')
@section('title') Portal Home@stop
@section('topname') {{ $user_name or 'Default' }} or Just Text@stop {{-- This entire section does not work --}}
@section('pageh2') Portal Home @stop
@section('main')
Portal Home {{-- This line works --}}
<br> The current UNIX timestamp is {{ time() }} {{-- This line does not work --}}
@stop
I am sure this is a simple error with all the of simple changes in syntax from laravel 4 to 5 but haven't been able to spot the error as I have been working on it today. Thanks to all who can help.
Edit: I am still baffled by this issue as all the research and studying that I have done shows that the code is correct. I have updated another part of my code above with some small edits that was copied directly from the Laravel doc site, yet still does not render in the page.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire