/** * @param Anime $anime * @param Page $page * @param Option $option */ public function __construct(Anime $anime, Page $page, Option $option) { $this->anime = $anime; $this->page = $page; $this->option = $option; $this->data['animeBanner'] = $this->anime->orderByRaw("RAND()")->where('type2', '=', 'subbed')->take(1)->first(); $this->data['topPagesList'] = $this->page->where('position', '=', 'top')->orderBy('order')->get(); $this->data['bottomPagesList'] = $this->page->where('position', '=', 'bottom1')->orderBy('order')->get(); $this->data['bottomPagesList2'] = $this->page->where('position', '=', 'bottom2')->orderBy('order')->get(); $this->data['bottomPagesList3'] = $this->page->where('position', '=', 'bottom3')->orderBy('order')->get(); $this->data['options'] = $this->option->all(); }
/** * Create a new page error composer. * @param Page $page * @param Option $option * @param Anime $anime */ public function __construct(Page $page, Option $option, Anime $anime) { $this->page = $page; $this->option = $option; $this->anime = $anime; $this->data['options'] = $this->option->all(); $this->data['animeBanner'] = $this->anime->orderByRaw("RAND()")->where('type2', '=', 'subbed')->take(1)->first(); $this->data['topPagesList'] = $this->page->where('position', '=', 'top')->orderBy('order')->get(); $this->data['bottomPagesList'] = $this->page->where('position', '=', 'bottom1')->orderBy('order')->get(); $this->data['bottomPagesList2'] = $this->page->where('position', '=', 'bottom2')->orderBy('order')->get(); $this->data['bottomPagesList3'] = $this->page->where('position', '=', 'bottom3')->orderBy('order')->get(); $this->data['pageTitle'] = $pageTitle = "Sorry, the page you have requested cannot be found."; $this->data['metaTitle'] = $pageTitle; $this->data['metaDesc'] = $pageTitle; $this->data['metaKey'] = $pageTitle; }
/** * Display a listing of the resource. * * @return \Illuminate\View\View */ public function index() { $this->data['pageTitle'] = "Home"; $this->data['desc'] = "Home Page"; $this->data['animesCount'] = $this->anime->where('position', '=', 'recently')->orWhere('position', '=', 'all')->get()->count(); $this->data['episodesList'] = $this->episode->with('anime')->where('show', '=', 1)->orderBy('date', 'DESC')->take('12')->get(); $this->data['imagesList'] = $this->image->orderBy('date', 'DESC')->take(10)->get(); $this->data['topPagesList'] = $this->page->where('position', '=', 'top')->orderBy('order')->get(); $this->data['bottomPagesList'] = $this->page->where('position', '=', 'bottom1')->orderBy('order')->get(); $this->data['bottomPagesList2'] = $this->page->where('position', '=', 'bottom2')->orderBy('order')->get(); $this->data['bottomPagesList3'] = $this->page->where('position', '=', 'bottom3')->orderBy('order')->get(); $this->data['options'] = $this->option->all(); $this->data['animeList'] = $this->anime->where('position', '=', 'recently')->orWhere('position', '=', 'all')->orderBy('id', 'DESC')->take(8)->get(); $this->data['upcomingEpisodes'] = $this->episode->with('anime')->where('coming_date', '<>', '')->where('not_yet_aired', '<>', '')->orderBy('coming_date', 'ASC')->take(6)->get(); $this->data['pageTitle'] = $title = "AnimeCenter: Watch Anime English Subbed/Dubbed Online in HD"; $this->data['metaTitle'] = "Watch Anime Online English Subbed/Dubbed | Watch Anime Online Free"; $this->data['metaDesc'] = "Watch Anime English Subbed/Dubbed Online in HD at AnimeCenter! Over 41000 Episodes" . ", and 2,146 Anime Series!"; $this->data['metaKey'] = "Watch Anime Online, Anime Subbed/Dubbed, Anime Episodes, Anime Stream, " . "Subbed Anime, Dubbed Anime"; return view('home.index', $this->data); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\RedirectResponse */ public function getDelete($id = 0) { $this->page->findOrFail($id)->delete(); $msg = 'Page was deleted successfully!'; return redirect()->action('Admin\\PageController@index')->with('success', $msg); }