/**
* Controller constructor.
*/
public function __construct()
{
// Get a user instance for the current user
$user = auth()->user();
if (!$user) {
$user = User::getDefault();
}
// Share variables with views
view()->share('signedIn', auth()->check());
view()->share('currentUser', $user);
// Share variables with controllers
$this->currentUser = $user;
$this->signedIn = auth()->check();
}