auth = $auth; } /** * Returns a list of global variables to add to the existing list. * * @return array An array of global variables */ public function getGlobals() { $user = $this->auth->user(); return [ 'user' => $user ? $user : [], ]; } }