Cachet/app/Composers/CurrentUserComposer.php

38 lines
775 B
PHP
Raw Normal View History

2015-01-28 00:51:28 -06:00
<?php
/*
* This file is part of Cachet.
*
2015-07-06 17:37:01 +01:00
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2015-01-28 00:51:28 -06:00
namespace CachetHQ\Cachet\Composers;
2015-06-01 11:45:48 +01:00
use Illuminate\Contracts\View\View;
2015-01-28 00:51:28 -06:00
use Illuminate\Support\Facades\Auth;
2016-10-07 13:51:59 +01:00
/**
* 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
2015-01-28 00:51:28 -06:00
{
/**
* Bind data to the view.
*
2015-06-01 11:45:48 +01:00
* @param \Illuminate\Contracts\View\View $view
2015-08-30 22:45:27 +01:00
*
* @return void
2015-01-28 00:51:28 -06:00
*/
public function compose(View $view)
{
$view->withCurrentUser(Auth::user());
2015-01-28 00:51:28 -06:00
}
}