/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $app_language = new AppLanguage(); $list_timeline = Timeline::with(['timelineDetails' => function ($query) { $query->where('language_code', '=', AppLanguage::getDefaultLanguage()); }])->orderBy('order')->get(); return view('admin.timeline.index', compact('list_timeline', 'app_language')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // Get history $list_histories = Timeline::with(['timelineDetails' => function ($query) { $query->where('language_code', '=', App::getLocale()); }])->orderBy('order', 'asc')->get(); $about_service = StaticPage::with(['pageDetails' => function ($query) { $query->where('language_code', '=', App::getLocale()); }])->where('properties', '=', 7)->firstOrFail(); $why_vietnam = StaticPage::with(['pageDetails' => function ($query) { $query->where('language_code', '=', App::getLocale()); }])->where('properties', '=', 8)->firstOrFail(); $message_ceo = StaticPage::with(['pageDetails' => function ($query) { $query->where('language_code', '=', App::getLocale()); }])->where('properties', '=', 9)->firstOrFail(); return view('about', compact('list_histories', 'about_service', 'why_vietnam', 'message_ceo')); }