Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions app/Filament/Pages/Dashboard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace App\Filament\Pages;

use App\Jobs\ExecSpeedtest;
use Filament\Notifications\Notification;
use Filament\Pages\Actions\Action;
use Filament\Pages\Dashboard as BasePage;

class Dashboard extends BasePage
{
protected static string $view = 'filament.pages.dashboard';

protected function getActions(): array
{
return [
Action::make('speedtest')
->label('Queue Speedtest')
->action('queueSpeedtest'),
];
}

public function queueSpeedtest()
{
ExecSpeedtest::dispatch();

Notification::make()
->title('Speedtest added to the queue')
->success()
->send();
}
}
2 changes: 1 addition & 1 deletion config/filament.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
'namespace' => 'App\\Filament\\Pages',
'path' => app_path('Filament/Pages'),
'register' => [
Pages\Dashboard::class,
// Pages\Dashboard::class,
],
],

Expand Down
5 changes: 5 additions & 0 deletions resources/views/filament/pages/dashboard.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<x-filament::page>
<p>
👋 Welcome to Speedtest Tracker, here you can track your internet speed using Ookla's Speedtest service. Keep in mind that this is still work in progress so make sure to check out the documentation and follow along on GitHub for updates.
</p>
</x-filament::page>