public function getOnlineAttribute($value)
    {
        $expiryDate = Carbon::now()
            ->subMinutes(config('session.lifetime'));

        return (!$this->logged_out)
            && $expiryDate->lt($this->last_active_at);
    }
public function getOnlineAttribute($value)
    {
        $expiryDate = Carbon::now()
            ->subMinutes(config('session.lifetime'));

        return (!$this->logged_out)
            && $expiryDate->lt($this->last_active_at);
    }
public function getOnlineAttribute ( $ value ) { $ expiryDate = Carbon :: now ( ) -> subMinutes ( config ( 'session.lifetime' ) ) ; return ( ! $ this -> logged_out ) && $ expiryDate -> lt ( $ this -> last_active_at ) ; }
accessor for current online state.

@param $value

@return \Illuminate\Database\Eloquent\Model
accessor for current online state .