Serverfireteam\Panel\Link::returnUrls PHP Method

returnUrls() public static method

public static returnUrls ( $forceRefresh = false )
    public static function returnUrls($forceRefresh = false)
    {
        if (!isset(self::$cache['all_urls']) || $forceRefresh) {
            $configs = Link::allCached($forceRefresh);
            self::$cache['all_urls'] = $configs->pluck('url')->toArray();
        }
        return self::$cache['all_urls'];
    }

Usage Example

Exemplo n.º 1
0
 public function returnEditView()
 {
     $configs = \Serverfireteam\Panel\Link::returnUrls();
     if (!isset($configs) || $configs == null) {
         throw new \Exception('NO URL is set yet !');
     } else {
         if (!in_array($this->entity, $configs)) {
             throw new \Exception('This url is not set yet !');
         } else {
             return \View::make('panelViews::edit', array('title' => $this->entity, 'edit' => $this->edit, 'helper_message' => $this->helper_message));
         }
     }
 }