Files
Cybrarist c5095d1f9b start building dashboard with widgets
add global search hotkey
add community stores where users can import/export stores from new repository
fix media markt 404 on crawling
add currency resource, so users can modify the rate without the need for API
add new '*' in case there are multiple fields in schema
add basic code for plugin support to test it in production, shouldn't affect anything
add warning message if ntfy is added without topic
2026-01-27 21:38:58 +04:00

54 lines
1.4 KiB
PHP

<?php
namespace App\Filament\Resources\Currencies;
use App\Filament\Resources\Currencies\Pages\CreateCurrency;
use App\Filament\Resources\Currencies\Pages\EditCurrency;
use App\Filament\Resources\Currencies\Pages\ListCurrencies;
use App\Filament\Resources\Currencies\Schemas\CurrencyForm;
use App\Filament\Resources\Currencies\Tables\CurrenciesTable;
use App\Models\Currency;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;
class CurrencyResource extends Resource
{
protected static ?string $model = Currency::class;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
protected static ?string $recordTitleAttribute = 'name';
protected static string | UnitEnum | null $navigationGroup = 'Settings';
public static function form(Schema $schema): Schema
{
return CurrencyForm::configure($schema);
}
public static function table(Table $table): Table
{
return CurrenciesTable::configure($table);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => ListCurrencies::route('/'),
'create' => CreateCurrency::route('/create'),
'edit' => EditCurrency::route('/{record}/edit'),
];
}
}