2015-01-28 00:51:28 -06:00
|
|
|
<?php
|
|
|
|
|
2015-04-19 08:52:39 +01:00
|
|
|
/*
|
|
|
|
* This file is part of Cachet.
|
|
|
|
*
|
2015-07-06 17:37:01 +01:00
|
|
|
* (c) Alt Three Services Limited
|
2015-04-19 08:52:39 +01:00
|
|
|
*
|
|
|
|
* 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>
|
|
|
|
*/
|
2015-08-03 22:32:36 +01:00
|
|
|
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)
|
|
|
|
{
|
2015-08-03 22:32:36 +01:00
|
|
|
$view->withCurrentUser(Auth::user());
|
2015-01-28 00:51:28 -06:00
|
|
|
}
|
|
|
|
}
|