Exemplo n.º 1
0
 public function __toString()
 {
     $user = site()->user();
     if ($user->hasRole('admin')) {
         return parent::__toString();
     }
     return "";
 }
Exemplo n.º 2
0
 public function __toString()
 {
     $languages = c::get('languages');
     $lang = $currentLang = strtoupper(site()->language()->code());
     foreach ($languages as $l) {
         if (isset($l['default']) && $l['default']) {
             $lang = strtoupper($l['code']);
         }
     }
     if ($currentLang == $lang) {
         return parent::__toString();
     }
     return "";
 }