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
|
|
|
}
|