61 lines
1.6 KiB
PHP
61 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\WalletTransactions;
|
|
|
|
use App\Filament\Resources\WalletTransactions\Pages\ListWalletTransactions;
|
|
use App\Filament\Resources\WalletTransactions\Pages\ViewWalletTransaction;
|
|
use App\Filament\Resources\WalletTransactions\Tables\WalletTransactionsTable;
|
|
use App\Models\WalletTransaction;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
use UnitEnum;
|
|
|
|
class WalletTransactionResource extends Resource
|
|
{
|
|
protected static ?string $model = WalletTransaction::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedArrowsRightLeft;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'مالی';
|
|
|
|
protected static ?string $recordTitleAttribute = 'id';
|
|
|
|
protected static ?string $modelLabel = 'تراکنش';
|
|
|
|
protected static ?string $pluralModelLabel = 'تراکنشها';
|
|
|
|
protected static ?string $navigationLabel = 'تراکنشها';
|
|
|
|
protected static ?int $navigationSort = 11;
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return WalletTransactionsTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListWalletTransactions::route('/'),
|
|
'view' => ViewWalletTransaction::route('/{record}'),
|
|
];
|
|
}
|
|
|
|
public static function canCreate(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public static function canEdit($record): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public static function canDelete($record): bool
|
|
{
|
|
return false;
|
|
}
|
|
}
|