/** * Display a listing of the resource. * * @method void scopeListGames() * * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function index() { $SteamGames = SteamGame::ListGames()->get(); $averagePlaytimePerDay = round(SteamGame::where('playtime_2weeks', '>', 0)->sum('playtime_2weeks') / 60 / 14, 2); return view('pages.SteamGames', ['SteamGames' => $SteamGames, 'averageplaytimeperday' => $averagePlaytimePerDay]); }