mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 21:49:01 +01:00
8e1c9801fb
Fixes #2810
39 lines
861 B
PHP
39 lines
861 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Cachet.
|
|
*
|
|
* (c) Alt Three Services Limited
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace CachetHQ\Cachet\Composers;
|
|
|
|
use Illuminate\Contracts\View\View;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use McCool\LaravelAutoPresenter\Facades\AutoPresenter;
|
|
|
|
/**
|
|
* This is the current user composer class.
|
|
*
|
|
* @author Joseph Cohen <joe@alt-three.com>
|
|
* @author James Brooks <james@alt-three.com>
|
|
* @author Graham Campbell <graham@alt-three.com>
|
|
*/
|
|
class CurrentUserComposer
|
|
{
|
|
/**
|
|
* Bind data to the view.
|
|
*
|
|
* @param \Illuminate\Contracts\View\View $view
|
|
*
|
|
* @return void
|
|
*/
|
|
public function compose(View $view)
|
|
{
|
|
$view->withCurrentUser(AutoPresenter::decorate(Auth::user()));
|
|
}
|
|
}
|