We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f26e9a commit 5866f6eCopy full SHA for 5866f6e
app/Models/DaftarSp2d.php
@@ -24,11 +24,4 @@ public function realisasiAnggaran(): HasMany
24
{
25
return $this->hasMany(RealisasiAnggaran::class);
26
}
27
-
28
- protected static function booted(): void
29
- {
30
- static::addGlobalScope('with-kerangka-acuan-count', function (Builder $builder) {
31
- $builder->whereYear('tanggal_sp2d',session('year'))->withCount('kerangkaAcuan');
32
- });
33
- }
34
app/Nova/DaftarSp2d.php
@@ -182,4 +182,9 @@ public function actions(NovaRequest $request)
182
183
return [];
184
185
+
186
+ public static function indexQuery(NovaRequest $request, $query)
187
+ {
188
+ $query->whereYear('tanggal_sp2d',session('year'))->withCount('kerangkaAcuan');
189
+ }
190
0 commit comments