BookStack/app/Http/Controllers/Controller.php

29 lines
631 B
PHP
Raw Normal View History

2015-07-12 15:01:42 -04:00
<?php
namespace Oxbow\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
2015-08-24 16:10:04 -04:00
use Illuminate\Support\Facades\Auth;
use Oxbow\User;
2015-07-12 15:01:42 -04:00
abstract class Controller extends BaseController
{
use DispatchesJobs, ValidatesRequests;
2015-08-24 16:10:04 -04:00
/**
* Controller constructor.
*/
public function __construct()
{
view()->share('signedIn', Auth::check());
$user = Auth::user();
if(!$user) {
$user = User::getDefault();
}
view()->share('user', $user);
}
2015-07-12 15:01:42 -04:00
}