Kimi chinh sua
This commit is contained in:
42
app/Filament/Resources/Payments/PaymentResource.php
Normal file
42
app/Filament/Resources/Payments/PaymentResource.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Payments;
|
||||
|
||||
use App\Filament\Resources\Payments\Pages;
|
||||
use App\Models\Payment;
|
||||
use App\Enums\NavigationGroup;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use App\Filament\Resources\Payments\Schemas\PaymentForm;
|
||||
use App\Filament\Resources\Payments\Tables\PaymentsTable;
|
||||
|
||||
class PaymentResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Payment::class;
|
||||
protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-banknotes';
|
||||
protected static string | \UnitEnum | null $navigationGroup = NavigationGroup::FINANCE->value;
|
||||
protected static ?int $navigationSort = 5;
|
||||
|
||||
protected static ?string $modelLabel = 'Phiếu thu';
|
||||
protected static ?string $pluralModelLabel = 'Phiếu thu';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return PaymentForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return PaymentsTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => Pages\ListPayments::route('/'),
|
||||
'create' => Pages\CreatePayment::route('/create'),
|
||||
'edit' => Pages\EditPayment::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user