REBELinBLUE\Deployer\Contracts\Github\LatestReleaseInterface::latest PHP Метод

latest() публичный Метод

public latest ( ) : false | string
Результат false | string
    public function latest();

Usage Example

Пример #1
0
 /**
  * Determines if the update prompt should show.
  *
  * @param View $view
  */
 public function compose(View $view)
 {
     $latest_tag = $this->release->latest();
     $current = Version::parse(APP_VERSION);
     $latest = Version::parse(APP_VERSION);
     if ($latest_tag) {
         $latest = Version::parse($latest_tag);
     }
     $is_outdated = $latest->compare($current) === 1;
     $view->with('is_outdated', $is_outdated);
     $view->with('current_version', $current);
     $view->with('latest_version', $latest);
 }
LatestReleaseInterface