Get last dateTime of last activity of this user
@return null|Carbon
500424
public function getLastActivityAttribute()
    {
        $activity = $this->activity;
        return ($activity instanceof UserActivity) ?
                Carbon::createFromFormat('Y-m-d H:i:s', $activity->last_activity) : null;
    }
468410
protected static function getDateTime()
    {
        // Lazyload
        if (null === self::$dateTime) {
            /* @var Doozr_Datetime_Service self::$dateTime */
            self::$dateTime = Doozr_Loader_Serviceloader::load('datetime');
        }

        return self::$dateTime;
    }
241026
public function getLastRefreshTimestamp()
    {
        $unixTime = Cache::get($this->cacheTimestampKey);
        
        $dateTime = new DateTime;
        $dateTime->setTimestamp($unixTime);
        
        return $dateTime;
    }
431273
public function getLastLogin()
    {
        if ($this->sessionBag->has(self::PARAM_LAST_LOGIN_NS)) {
            return $this->sessionBag->get(self::PARAM_LAST_LOGIN_NS);
        } else {
            return null;
        }
    }
90101
public function get_lastQuery() {
		$retval = null;
		if(is_object($this->sth)) {
			$retval = $this->sth->queryString;
		}
		else {
			throw new \Exception(__METHOD__ .': statement handle not set');
		}
		return($retval);
	}
1093705
public function getLastLoggedAtAttribute()
    {
        $lastLogin = Logs::where('user_id', $this->id)
                ->where('name', 'like', 'USERAUTHLISTENER_ONUSERLOGIN')
                ->orderBy('created_at', 'desc')
                ->get(['created_at'])
                ->first();

        return ($lastLogin) ? $lastLogin->created_at->diffForHumans() : 'never';
    }
426979
public function getLastAccessedAt() {
		$timestamp = fileatime($this->pathname);
		$time = new DateTime();
		$time->setTimestamp($timestamp);
		return $time;
	}
101314
public function getDeletedAt()
    {
        if (!$this->deletedAt) {
            return null;
        } else {
            return $this->deletedAt
                ->setTimezone(new DateTimeZone(app('config')->timezone));
        }
    }
1207869
protected function getLastMonth() {
        if (!$this->_lastMonth) {
            $this->_lastMonth = new LastMonthList($this->version, $this->solution['accountSid']);
        }

        return $this->_lastMonth;
    }
367033
public function last()
    {
        $last = null;
        foreach ($this->each() as $v) {
            $last = $v;
        }
        return $last;
    }
29749
public function last()
    {
        if ($this->count()) {
            $models = $this->getModels();
            return $models[$this->count() - 1];
        }
        return null;
    }
787455
public function getLogoutDate()
    {
        return isset($this->loginData[self::LOGOUT_DATE]) ? $this->loginData[self::LOGOUT_DATE] : null;
    }
224524
public function getLastMessage() {
		$count = count($this->_data);
		if (!$count) {
			return null;
		}
		return $this->_data[$count - 1];
	}
764160
public function getDateTime()
    {
        if (!empty($this->parts) && $this->parts[0] instanceof DatePart) {
            return $this->parts[0]->getDateTime();
        }
        return null;
    }
1243783
public function getFirstAndLastDayOfCurrentMonth()
  {
    $Date = new Carbon('first day of this month');
    $Date2 = new Carbon('last day of this month');

    return array('userFormattedFrom' => $Date->format($this->Lang->get('form.phpShortDateFormat')), 'userFormattedTo' => $Date2->format($this->Lang->get('form.phpShortDateFormat')), 'databaseFormattedFrom' => $Date->format('Y-m-d'), 'databaseFormattedTo' => $Date2->format('Y-m-d'));
  }
669296
public function getLastActivityAgo()
    {
        $now = \Yii::$app->formatter->asTimestamp(time());
        return (int)($now - (int)$this->last_activity_at);
    }
533290
public function updateLastActivity()
    {
        $now = \Yii::$app->formatter->asTimestamp(time());

        if (!$this->lastActivityAgo || $this->lastActivityAgo > 10) {
            $this->last_activity_at = $now;
            $this->save(false);
        }

        return $this;
    }