1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-30 23:52:40 +01:00
BookStack/app/Http/Controllers/Controller.php

29 lines
631 B
PHP
Raw Normal View History

2015-07-12 21:01:42 +02: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 22:10:04 +02:00
use Illuminate\Support\Facades\Auth;
use Oxbow\User;
2015-07-12 21:01:42 +02:00
abstract class Controller extends BaseController
{
use DispatchesJobs, ValidatesRequests;
2015-08-24 22:10:04 +02: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 21:01:42 +02:00
}