pianello-api/app/View/Composers/LoggedInUserComposer.php

17 lines
271 B
PHP
Raw Normal View History

<?php
namespace App\View\Composers;
use Illuminate\View\View;
class LoggedInUserComposer
{
/**
* Bind loggedin user value to the view.
*/
public function compose(View $view): void
{
$view->with('loggedinUser', request()->user());
}
}