示例#1
0
 /**
  * Load all the bundles with language files and get their paths
  *
  * @param string $lang
  * @return array
  */
 public static function bundles($lang = null)
 {
     $folders = array();
     // Get the bundle languages
     if ($bundles = \Laravel\Bundle::all()) {
         foreach ($bundles as $bundle) {
             if (is_dir(\Laravel\Bundle::path($bundle['location']) . '/language/' . $lang)) {
                 $folders[] = array('path' => \Laravel\Bundle::path($bundle['location']) . 'language/', 'name' => $bundle);
             }
         }
     }
     return $folders;
 }