feat: spots

This commit is contained in:
Michael 2025-07-11 15:03:59 +02:00
parent 08010fbb61
commit a4e1a3328f
20 changed files with 172 additions and 97 deletions

View file

@ -30,11 +30,19 @@ class SmartBlockController extends Controller
} else {
$pagination = $request->per_page;
}
$smartblocks = SmartBlock::searchFilter($request)
->with(['creator', 'tracks', 'tracks.file', 'criteria']);
return SmartBlock::searchFilter($request)
->with(['creator', 'tracks', 'tracks.file', 'criteria'])
if($request->has('smartblockType')) {
$smartblockType = $request->get('smartblockType');
$smartblocks = ($smartblockType == 'show')
? $smartblocks->doesntHave('spotSmartblock')
: $smartblocks->has('spotSmartblock');
}
return $smartblocks
->paginate($pagination)
->toJson();show
->toJson();
}
/**