mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-18 05:58:18 +01:00
38 lines
775 B
PHP
38 lines
775 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;
|
|
|
|
/**
|
|
* This is the current user composer.
|
|
*
|
|
* @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(Auth::user());
|
|
}
|
|
}
|