src/Models/Article.php
public function Link()
    {
        $ctrl = Controller::curr();
        if ($ctrl instanceof HailPageController) {
            $link = $ctrl->Link();
        } else {
            //If outside HailPageController try to find the first Hail Page
            $page = HailPage::get()->first();
            if (!empty($page)) {
                $link = $page->Link();
            }
        }

        if (!isset($link)) {
            return "";
        }

        return $link . "article/" . $this->HailID . '/' . Convert::raw2url($this->Title);
    }
public function Link()
    {
        $ctrl = Controller::curr();
        if ($ctrl instanceof HailPageController) {
            $link = $ctrl->Link();
        } else {
            //If outside HailPageController try to find the first Hail Page
            $page = HailPage::get()->first();
            if (!empty($page)) {
                $link = $page->Link();
            }
        }

        if (!isset($link)) {
            return "";
        }

        return $link . "article/" . $this->HailID . '/' . Convert::raw2url($this->Title);
    }
public function Link ( ) { $ ctrl = Controller :: curr ( ) ; if ( $ ctrl instanceof HailPageController ) { $ link = $ ctrl -> Link ( ) ; } else { //If outside HailPageController try to find the first Hail Page
 $ page = HailPage :: get ( ) -> first ( ) ; if ( ! empty ( $ page ) ) { $ link = $ page -> Link ( ) ; } } if ( ! isset ( $ link ) ) { return "" ; } return $ link . "article/" . $ this -> HailID . '/' . Convert :: raw2url ( $ this -> Title ) ; }
Return the Article link for the current HailPageController

@return string
Return the Article link for the current HailPageController