/** * @return View */ public function index() { $css = 'home'; $pageHome = true; $games = Game::latest('update')->take(20)->get(); return view('games.home', compact('games', 'pageHome', 'css'))->with([ 'title' => 'Free Android Apps Download | Best Games for Android Mobile Phone - AppForAndroidPhone', 'desc' => 'AppForAndroidPhone.com supports free android apps and games apk download. Thousands of top best android apps at AppForAndroidPhone! Play free apps and games for android mobile phone now!', 'keyword' => 'android apps,android apps download,free android apps,best android apps,apps for android,appforandroiphone,games, android games download, android games, free android games' ]); }
function index() { $games = Game::latest()->get(); return view('games.index')->with('games', $games); }
public function indexTeam() { $games = Game::latest()->onlyTeam()->get(); // $games = Game::latest()->get(); return view('game/listTeam', compact('games')); }
$page = null; $pageSearch = true; $term = $matches[1]; if (strlen($term) > 2) { $term = str_replace('-',' ', $term); $keyword = Keyword::where('name', $term)->first(); if (!$keyword) { $keyword = new Keyword(); $keyword->create(['name' => $term, 'count' => 1]); } else { $keyword->count ++; $keyword->save(); } $games = Game::tagged($term)->latest('update')->paginate(20); } else { $games = Game::latest('update')->paginate(20); } return view('games.search', compact('games', 'term', 'pageSearch', 'css', 'page'))->with([ 'title' => 'Search result for '.$term.' - AppForAndroidPhone', 'desc' => '', 'keyword' => '' ]); } }); //categories details Route::get('android/{value}', function($value){ if (preg_match('/top-([a-z0-9\-]+)-(apps|games)/', $value, $matches)) { $css = 'app'; $category = Category::where('slug', $matches[1])->first();
public function index() { $games = Game::latest('created_at')->get(); return view('games.index', compact('games')); }