Tips and Tricks

You can get the current user as:

echo Auth::user()->name;

In a template, it's used like:

{{ Auth::user()->name }}

In a template, it's best to wrap this around a check for if the user is logged in or not:

@if(Auth::check())
    {{ Auth::user()->name }}
@endif

If a value is not set, you might get an error, so one way of checking is to use the Laravel filled() helper:

@if(filled($flight->flight_number))
    {{ $flight->flight_number }}
@endif