protected function readFromDatabase(string $session_id, $ip) : ?Model
    {
        return $this->getModel()
                    ->newQuery()
                    ->where('id', $session_id)
                    ->where('ipv4', $this->getLongIp($ip))
                    ->first();
    }
protected function readFromDatabase(string $session_id, $ip) : ?Model
    {
        return $this->getModel()
                    ->newQuery()
                    ->where('id', $session_id)
                    ->where('ipv4', $this->getLongIp($ip))
                    ->first();
    }
protected function readFromDatabase ( string $ session_id , $ ip ) : ? Model { return $ this -> getModel ( ) -> newQuery ( ) -> where ( 'id' , $ session_id ) -> where ( 'ipv4' , $ this -> getLongIp ( $ ip ) ) -> first ( ) ; }
Read session from database

@param string     $session_id
@param string|int $ip
@return \Illuminate\Database\Eloquent\Model|\Laranix\Session\Session|null
Read session from database