diff --git a/app/Http/Controllers/TestController.php b/app/Http/Controllers/TestController.php index 7fdc58d..ed9878f 100644 --- a/app/Http/Controllers/TestController.php +++ b/app/Http/Controllers/TestController.php @@ -17,8 +17,8 @@ class TestController extends Controller public function flashTest(Request $request) { - $sg = $this->scoringGuideCacheService->getAuditions(); - - return view('test', compact('sg')); + $auditions = $this->scoringGuideCacheService->getAuditions(); + $auditionEleven = $this->scoringGuideCacheService->getAudition(11); + return view('test', compact('auditions','auditionEleven')); } } diff --git a/app/Services/AuditionCacheService.php b/app/Services/AuditionCacheService.php index b32c4aa..f90e9d2 100644 --- a/app/Services/AuditionCacheService.php +++ b/app/Services/AuditionCacheService.php @@ -24,6 +24,11 @@ class AuditionCacheService }); } + public function getAudition($id) + { + return $this->getAuditions()->firstWhere('id',$id); + } + public function refreshCache() { Cache::forget($this->cacheKey); diff --git a/app/Services/TabulationService.php b/app/Services/TabulationService.php new file mode 100644 index 0000000..b25c6d4 --- /dev/null +++ b/app/Services/TabulationService.php @@ -0,0 +1,14 @@ +Test Page @php - dump($sg); + dump($auditionEleven); + $auditions->load('entries.scoreSheets'); + dump($auditions); @endphp - + @foreach($auditions as $a) + {{$a->entries->count()}}