The session is a way to store and retrieve information across multiple pages, get logged user details and other useful methods.


  • Session::get($key)
    Used to access the session information stored on the database. To access the session use this method in this way: Session::get("key").
  • Session::set($key, $value)
    This method is used to set the session information into the database.
    And the method accept parameter in this way: Session::set("key",value).
  • Session::getUserObject()
    This method is same the Auth::getUserLoggedObject method, used to obtain the current logged User object.
  • Session::getUserID()
    Used to view the current logged user id.
  • Session::loginUser($userID)
    This method update the session information that user is logged in successfully.
  • Session::logoutUser()
    This method update the session information about the user is logout successfully.
  • Session::isLoggedIn()
    Check if the user has already done the login session.
  • Session::CSRFCheckValidity($postArray, $throwException)
    Check the validity of CSRF token
  • Session::CSRFRenderHiddenField()
    Used to inject in the document dom the input with CSRF token.