| Total Complexity | 2 | 
| Total Lines | 36 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 9 | class HomeController extends Controller  | 
            ||
| 10 | { | 
            ||
| 11 | /**  | 
            ||
| 12 | * Show the application homepage  | 
            ||
| 13 | *  | 
            ||
| 14 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View  | 
            ||
| 15 | */  | 
            ||
| 16 | public function index()  | 
            ||
| 17 |     { | 
            ||
| 18 | $featuredSpots = Spot::featured()->get();  | 
            ||
| 19 | |||
| 20 | $spotsCount = Spot::count();  | 
            ||
| 21 | |||
| 22 |         $countriesCount = Country::whereHas('spots', function ($spot) { | 
            ||
| 23 |             $spot->where('is_approved', true); | 
            ||
| 24 | })->count();  | 
            ||
| 25 | |||
| 26 |         return view('welcome', compact('featuredSpots', 'spotsCount', 'countriesCount')); | 
            ||
| 27 | }  | 
            ||
| 28 | |||
| 29 | /**  | 
            ||
| 30 | * Show the about us page.  | 
            ||
| 31 | *  | 
            ||
| 32 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View  | 
            ||
| 33 | */  | 
            ||
| 34 | public function about()  | 
            ||
| 45 | }  | 
            ||
| 46 | }  | 
            ||
| 47 |