Reputation: 299
am new in laravel, i have been searching for so on the net but i couldn't find a clear solution to this. i have a menu i want to include to all admin pages
menu.blade.php
@section('menu')
<ul>
<li><a href="{{URL::to('addHouse')}}">Add House</a></li>
<li><a href="{{URL::to('addRenter')}}"></a>Add Renter</li>
<li><a href="{{URL::to('addRoom')}}"></a>Add Rooms</li>
<li><a href="{{URL::to('Payment')}}"></a>Payments</li>
</ul>
@stop
register.blade.php
Register here
@yield('menu')
But this is not working, i don't know the way to go, please help
Upvotes: 0
Views: 684
Reputation: 111839
If you want to include menu in admin pages you can do it this way:
menu.blade.php
<ul>
<li><a href="{{URL::to('addHouse')}}">Add House</a></li>
<li><a href="{{URL::to('addRenter')}}"></a>Add Renter</li>
<li><a href="{{URL::to('addRoom')}}"></a>Add Rooms</li>
<li><a href="{{URL::to('Payment')}}"></a>Payments</li>
</ul>
register.blade.php
Register here
@include('menu')
Upvotes: 1