Test and update
This commit is contained in:
parent
d8e20d5f64
commit
008cf0e7b0
|
|
@ -127,3 +127,5 @@ class ScoringGuideController extends Controller
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO need to be able to delete a scoring guide
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,23 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Services\ScoringGuideCacheService;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
|
|
||||||
class TestController extends Controller
|
class TestController extends Controller
|
||||||
{
|
{
|
||||||
|
protected $scoringGuideCacheService;
|
||||||
|
|
||||||
|
public function __construct(ScoringGuideCacheService $scoringGuideCacheService)
|
||||||
|
{
|
||||||
|
$this->scoringGuideCacheService = $scoringGuideCacheService;
|
||||||
|
}
|
||||||
|
|
||||||
public function flashTest(Request $request)
|
public function flashTest(Request $request)
|
||||||
{
|
{
|
||||||
|
$sg = $this->scoringGuideCacheService->getScoringGuides();
|
||||||
|
|
||||||
Session::flash('msg|this is the message','success');
|
return view('test', compact('sg'));
|
||||||
Session::flash('msg|another message','caution');
|
|
||||||
Session::flash('msg|you better be careful','danger');
|
|
||||||
|
|
||||||
return view('test');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,13 @@ use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
|
||||||
class RefreshScoringGuideCache
|
class RefreshScoringGuideCache
|
||||||
{
|
{
|
||||||
|
protected $cacheService;
|
||||||
/**
|
/**
|
||||||
* Create the event listener.
|
* Create the event listener.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct(ScoringGuideCacheService $cacheService)
|
||||||
{
|
{
|
||||||
//
|
$this->cacheService = $cacheService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -22,7 +23,7 @@ class RefreshScoringGuideCache
|
||||||
*/
|
*/
|
||||||
public function handle(ScoringGuideChange $event): void
|
public function handle(ScoringGuideChange $event): void
|
||||||
{
|
{
|
||||||
ScoringGuideCacheService::refreshCache();
|
$this->cacheService->refreshCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
use App\Models\SchoolEmailDomain;
|
use App\Models\SchoolEmailDomain;
|
||||||
use App\Models\ScoreSheet;
|
use App\Models\ScoreSheet;
|
||||||
use App\Models\ScoringGuide;
|
use App\Models\ScoringGuide;
|
||||||
use App\Models\User;use App\Settings;
|
use App\Models\User;use App\Services\ScoringGuideCacheService;use App\Settings;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
|
|
@ -13,12 +13,8 @@
|
||||||
<x-slot:page_title>Test Page</x-slot:page_title>
|
<x-slot:page_title>Test Page</x-slot:page_title>
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$a = Audition::find(9);
|
dump($sg);
|
||||||
dump ($a->rankedEntries());
|
|
||||||
dump ($a->rankedEntries());
|
|
||||||
dump ($a->rankedEntries());
|
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</x-layout.app>
|
</x-layout.app>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue