Initial commit: Pireon Admin — headless admin panel and public API
Laravel 13 + Filament 5 admin panel and REST API for a non-profit developer collective, backed by the Pireon OAuth identity server. The public site is a separate, server-rendered application consuming /api/public/v1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
45
app/Support/Health/Checks/TalksWithoutSpeaker.php
Normal file
45
app/Support/Health/Checks/TalksWithoutSpeaker.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Support\Health\Checks;
|
||||
|
||||
use App\Filament\Resources\Talks\TalkResource;
|
||||
use App\Models\Talk;
|
||||
use App\Support\Health\Check;
|
||||
use App\Support\Health\Finding;
|
||||
|
||||
/**
|
||||
* Talks nobody is credited with.
|
||||
*
|
||||
* Half the value of writing one down is that it also appears on the profile of
|
||||
* whoever gave it. Without the link it is written once and shown once, which
|
||||
* is most of the work for half the result.
|
||||
*/
|
||||
class TalksWithoutSpeaker implements Check
|
||||
{
|
||||
public function key(): string
|
||||
{
|
||||
return 'talks-without-speaker';
|
||||
}
|
||||
|
||||
public function permission(): ?string
|
||||
{
|
||||
return 'talks.view_any';
|
||||
}
|
||||
|
||||
public function run(): Finding
|
||||
{
|
||||
$talks = Talk::query()
|
||||
->public()
|
||||
->whereNull('member_id')
|
||||
->get(['id', 'title']);
|
||||
|
||||
return Finding::problem(
|
||||
$this->key(),
|
||||
$talks->count(),
|
||||
url: TalkResource::getUrl('index'),
|
||||
samples: $talks->pluck('title')->all(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user