Files
nuhodds_fi4/app/Filament/Pages/Monitor.php
T
2025-11-29 10:36:34 +01:00

66 lines
1.7 KiB
PHP

<?php
namespace App\Filament\Pages;
use App\Models\Comparatore;
use BackedEnum;
use Filament\Actions\Action;
use Filament\Pages\Page;
use Filament\Support\Enums\Width;
use UnitEnum;
class Monitor extends Page
{
protected static string | \BackedEnum | null $navigationIcon = 'phosphor-monitor';
protected string $view = 'filament.pages.monitor';
protected static ?string $recordTitleAttribute = 'name';
protected static ?string $navigationLabel = 'Monitor';
protected static ?string $pluralLabel = 'Monitor';
protected ?string $heading = '';
protected static ?string $title = '';
public $data = [];
// protected array $extraBodyAttributes = ['class' => 'border border-red-500'];
// public function getMaxContentWidth(): Width
// {
// return Width::Full;
// }
public function mount()
{
$tmp = Comparatore::limit(100)->get();
$data = [];
foreach ($tmp as $value) {
$data[] = json_decode($value['fdata'], 1);
}
$this->data = json_encode($data);
}
// protected static string|UnitEnum|null $navigationGroup = 'Administration';
// public function onboardingAction(): Action
// {
// return Action::make('onboarding')
// ->modalHeading('Welcome');
// }
// protected function getHeaderActions(): array
// {
// return [
// Action::make('edit')->modalHeading('Welcome'),
// // ->url(route('posts.edit', ['post' => $this->post])),
// Action::make('delete'),
// // ->requiresConfirmation()
// // ->action(fn () => $this->post->delete()),
// ];
// }
}