public function getLocales()
 {
     // 			$locales = Config::get('app.locales');
     // if ( Schema::hasTable('locales') ) {
     $locales = Locale::all();
     if (empty($locales)) {
         throw new LocalesNotDefinedException('Please make sure you have run "php artisan config:publish dimsav/laravel-translatable" ' . ' and that the locales configuration is defined.');
     }
     //}
     //dd($locales);
     return $locales;
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $locales = $this->locale->all();
     //dd($locales);
     return Theme::View('general::locales.index', compact('locales'));
 }
Exemple #3
0
 public function getLocales()
 {
     // 		$config = App::make('config');
     // 		$locales = (array) $config->get('languages.supportedLocales', []);
     $locales = Locale::all();
     // 		$locales = DB::table('locales')
     // 			->lists('locale');
     //dd($locales);
     if (empty($locales)) {
         throw new LocalesNotDefinedException('Please make sure you have run "php artisan config:publish dimsav/laravel-translatable" ' . ' and that the locales configuration is defined.');
     }
     return $locales;
 }