FleetCart/Modules/User/Http/ViewComposers/CurrentUserComposer.php
2023-12-03 14:07:47 +00:00

21 lines
332 B
PHP

<?php
namespace Modules\User\Http\ViewComposers;
use Illuminate\View\View;
class CurrentUserComposer
{
/**
* Bind data to the view.
*
* @param View $view
*
* @return void
*/
public function compose($view)
{
$view->with('currentUser', auth()->user());
}
}