Remove Auth calls from views

This commit is contained in:
Joseph Cohen
2015-01-28 00:51:28 -06:00
parent 5b618c0291
commit cce057c2d3
13 changed files with 46 additions and 24 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace CachetHQ\Cachet\Composers;
use Illuminate\Support\Facades\Auth;
use Illuminate\View\View;
class LoggedUserComposer
{
/**
* Bind data to the view.
*
* @param \Illuminate\View\View $view
*
* @return void
*/
public function compose(View $view)
{
$view->with('loggedUser', Auth::user());
}
}