Files
fotospiel-app/app/Filament/Widgets/TopTenantsByUploads.php
SEB Fotografie - soeren fc1e64fea3 feat(profile): add username + preferred_locale; wire to Inertia + middleware
- DB: users.username (unique), users.preferred_locale (default from app.locale)
- Backend: validation, model fillable; share supportedLocales; SetLocaleFromUser
- Frontend: profile page fields + types
- Filament: SuperAdmin profile page with username/language

feat(admin-nav): move Tasks to Bibliothek and add menu labels

fix(tasks-table): show localized title/emotion/event type; add translated headers

feat(l10n): add missing table headers for emotions and event types; normalize en/de files

refactor: tidy translations for tasks/emotions/event types
2025-09-11 21:17:19 +02:00

37 lines
1.0 KiB
PHP

<?php
namespace App\Filament\Widgets;
use Filament\Tables;
use Filament\Widgets\TableWidget as BaseWidget;
use App\Models\Tenant;
class TopTenantsByUploads extends BaseWidget
{
protected static ?string $heading = null;
public function getHeading()
{
return __('admin.widgets.top_tenants_by_uploads.heading');
}
protected ?string $pollingInterval = '60s';
public function table(Tables\Table $table): Tables\Table
{
return $table
->query(
Tenant::query()
->withCount('photos')
->orderByDesc('photos_count')
->limit(5)
)
->columns([
Tables\Columns\TextColumn::make('id')->label(__('admin.common.hash'))->width('60px'),
Tables\Columns\TextColumn::make('name')->label(__('admin.common.tenant'))->searchable(),
Tables\Columns\TextColumn::make('photos_count')->label(__('admin.common.uploads'))->numeric(),
])
->paginated(false);
}
}