path = config('app.client_path'); } public function home(){ $data['featuredNews'] = News::where('featured_news',"True")->where('status',1)->first(); $data['provinces'] = Provinces::with('provinceNews')->limit(5)->get(); $data['categories'] = Newscategories::with('news')->get(); $data['interviews'] = Newscategories::with('interviewNews')->get(); $data['politics'] = Newscategories::with('politicNews')->get(); // $data['economics'] = Newscategories::with('news')->inRandomOrder()->get(); $data['economics'] = Economies::with('news') ->orderBy('display_order') ->where('status',1) ->get(); $data['sports'] = Newscategories::with('sportNews')->get(); $data['cultural'] = Newscategories::with('culturalNews')->get(); $data['technology'] = Newscategories::with('technologyNews')->get(); $data['entertainment'] = Newscategories::with('entertainmentNews')->get(); $data['branches'] = Newscategories::with('branchesNews')->get(); // dd($data['entertainment']); $data['internationalNews'] = News_type::with('news')->get(); // dd($data['internationalNews']); return view($this->path.'.home',$data); } public function single(){ return view($this->path.'.single'); } public function newsDetail(){ return view($this->path.'.news-detail'); } }