Add singular audition method to audition cache service
This commit is contained in:
parent
ff85fd1c86
commit
ddd4632509
|
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,11 @@ class AuditionCacheService
|
|||
});
|
||||
}
|
||||
|
||||
public function getAudition($id)
|
||||
{
|
||||
return $this->getAuditions()->firstWhere('id',$id);
|
||||
}
|
||||
|
||||
public function refreshCache()
|
||||
{
|
||||
Cache::forget($this->cacheKey);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
class TabulationService
|
||||
{
|
||||
/**
|
||||
* Create a new class instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
@ -13,8 +13,12 @@
|
|||
<x-slot:page_title>Test Page</x-slot:page_title>
|
||||
|
||||
@php
|
||||
dump($sg);
|
||||
dump($auditionEleven);
|
||||
$auditions->load('entries.scoreSheets');
|
||||
dump($auditions);
|
||||
@endphp
|
||||
|
||||
@foreach($auditions as $a)
|
||||
{{$a->entries->count()}}<hr>
|
||||
@endforeach
|
||||
|
||||
</x-layout.app>
|
||||
|
|
|
|||
Loading…
Reference in New Issue