forked from TFMM/silent-auction
76 lines
2.0 KiB
PHP
76 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources;
|
|
|
|
use App\Filament\Resources\PaymentMethodsResource\Pages;
|
|
use App\Filament\Resources\PaymentMethodsResource\RelationManagers;
|
|
use App\Models\PaymentMethods;
|
|
use UnitEnum;
|
|
use BackedEnum;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Tables\Table;
|
|
use Filament\Tables;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Actions\EditAction;
|
|
use Filament\Actions\BulkActionGroup;
|
|
use Filament\Actions\DeleteBulkAction;
|
|
|
|
class PaymentMethodsResource extends Resource
|
|
{
|
|
protected static ?string $model = PaymentMethods::class;
|
|
|
|
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
|
|
|
protected static string | UnitEnum | null $navigationGroup = 'Silent Auction';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextInput::make('pm_name')
|
|
->label('Method Name'),
|
|
]);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return $table
|
|
->columns([
|
|
TextColumn::make('pm_name')
|
|
->label('Method Name')
|
|
->sortable(),
|
|
])
|
|
->filters([
|
|
//
|
|
])
|
|
->recordActions([
|
|
EditAction::make(),
|
|
])
|
|
->toolbarActions([
|
|
BulkActionGroup::make([
|
|
DeleteBulkAction::make(),
|
|
]),
|
|
]);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => Pages\ListPaymentMethods::route('/'),
|
|
'create' => Pages\CreatePaymentMethods::route('/create'),
|
|
'edit' => Pages\EditPaymentMethods::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|