private function getDropdowns() { $countries = Country::withTranslation()->whereIsActive()->orderByTranslation('sortas')->get()->lists('name', 'id'); $languages = Language::orderBy('name')->get()->lists('name', 'id'); $currencies = Currency::withTranslation()->orderByTranslation('sortas')->get()->lists('name', 'id'); view()->share('countries', $countries); view()->share('languages', $languages); view()->share('currencies', $currencies); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $this->authorize('show', new Language()); $languages = Language::orderBy('name')->paginate(25); return view('languages.index', compact('languages')); }