pianello-api/app/View/Composers/LoggedInUserComposer.php
Ale Gallo b91cf0cbde Committing laravel + api (part 1)
committing part of the laravel system with templating files and api implementation.
2023-11-10 15:54:41 +01:00

16 lines
271 B
PHP

<?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());
}
}