app/Http/Controllers/EventSearchController.php
Method index
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function index(Request $request)
{
$cacheExpireTime = 900; // expressed in seconds (15 min)
$backgroundImages = BackgroundImage::all();
Avoid too many return
statements within this method. Open
Open
return view('eventSearch.index', compact('events'))
->with('i', (request()->input('page', 1) - 1) * 20)
->with('eventCategories', $eventCategories)
->with('continents', $continents)
->with('countries', $countries)