| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 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 | } |
||
| 47 |