src/Traits/Session/SessionTrait.php
public function getDefaultSession(): ?Session
    {
        // By default, the Session Facade does not return the
        // any actual session instance, but rather an
        // instance of \Illuminate\Session\SessionManager.
        // Therefore, we make sure only to obtain its
        // "driver", to make sure that its only the connection
        // instance that we obtain.
        $manager = SessionFacade::getFacadeRoot();
        if (isset($manager)) {
            return $manager->driver();
        }
        return $manager;
    }
public function getDefaultSession(): ?Session
    {
        // By default, the Session Facade does not return the
        // any actual session instance, but rather an
        // instance of \Illuminate\Session\SessionManager.
        // Therefore, we make sure only to obtain its
        // "driver", to make sure that its only the connection
        // instance that we obtain.
        $manager = SessionFacade::getFacadeRoot();
        if (isset($manager)) {
            return $manager->driver();
        }
        return $manager;
    }
public function getDefaultSession ( ) : ? Session { // By default, the Session Facade does not return the // any actual session instance, but rather an // instance of \Illuminate\Session\SessionManager. // Therefore, we make sure only to obtain its // "driver", to make sure that its only the connection // instance that we obtain. $ manager = SessionFacade :: getFacadeRoot ( ) ; if ( isset ( $ manager ) ) { return $ manager -> driver ( ) ; } return $ manager ; }
Get a default session value, if any is available

@return Session|null A default session value or Null if no default value is available
Get a default session value if any is available