71 lines
2.0 KiB
PHP
71 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Clusters\Settings\Resources\CurrencyRates;
|
|
|
|
use App\Filament\Clusters\Settings\Resources\CurrencyRates\Pages\CreateCurrencyRate;
|
|
use App\Filament\Clusters\Settings\Resources\CurrencyRates\Pages\EditCurrencyRate;
|
|
use App\Filament\Clusters\Settings\Resources\CurrencyRates\Pages\ListCurrencyRates;
|
|
use App\Filament\Clusters\Settings\Resources\CurrencyRates\Schemas\CurrencyRateForm;
|
|
use App\Filament\Clusters\Settings\Resources\CurrencyRates\Tables\CurrencyRatesTable;
|
|
use App\Filament\Clusters\Settings\SettingsCluster;
|
|
use App\Modules\CurrencyRate\Models\CurrencyRate;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
|
|
class CurrencyRateResource extends Resource
|
|
{
|
|
protected static ?string $model = CurrencyRate::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCurrencyDollar;
|
|
|
|
protected static ?string $cluster = SettingsCluster::class;
|
|
|
|
|
|
protected static ?string $recordTitleAttribute = 'name';
|
|
|
|
public static function getNavigationGroup(): ?string
|
|
{
|
|
return __('Currencies');
|
|
}
|
|
|
|
public static function getModelLabel(): string
|
|
{
|
|
return __('Currency rate');
|
|
}
|
|
|
|
public static function getPluralModelLabel(): string
|
|
{
|
|
return __('Currency rates');
|
|
}
|
|
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return CurrencyRateForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return CurrencyRatesTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListCurrencyRates::route('/'),
|
|
'create' => CreateCurrencyRate::route('/create'),
|
|
'edit' => EditCurrencyRate::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|