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
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class StatsOverview extends BaseWidget
protected function getCards(): array
{
return [
Card::make('Latest download', formatBytes(Result::latest()->first()->download)),
Card::make('Latest upload', formatBytes(Result::latest()->first()->upload)),
Card::make('Latest ping', round(Result::latest()->first()->ping, 2)),
Card::make('Latest download', formatBytes(Result::latest()->first()?->download ?: 0)),
Card::make('Latest upload', formatBytes(Result::latest()->first()?->upload ?: 0)),
Card::make('Latest ping', round(Result::latest()->first()?->ping ?: 0, 2)),
];
}
}
4 changes: 3 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
namespace App\Models;

// use Illuminate\Contracts\Auth\MustVerifyEmail;

use Filament\Models\Contracts\FilamentUser;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;

class User extends Authenticatable
class User extends Authenticatable implements FilamentUser
{
use HasApiTokens, HasFactory, Notifiable;

Expand Down