Passing a $username to the @include file in laravel -



Passing a $username to the @include file in laravel -

i'm trying pass $username after log in @include(header.blade.php) can username @ top of business relationship pages. how can this?

----- header.blade.php

<ul class="nav navbar-nav navbar-right"> <li><a href="/profile/">good day, {{ $username should go here }} </a></li> <li><a href="/logout/">logout</a></li> </ul>

----- layout.master

<!doctype html> <html> <head> <meta charset="utf-8"> @include('includes.head') </head> @include('includes.header') @yield('content') @yield('frontoffice') @include('includes.footer') <body> </body> </html>

you can create utilize of auth

@if(auth::check()) {{ auth::user()->username}} @else invitee @endif

laravel laravel-4

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -