silent-auction/app/Filament/Resources/PaymentMethodsResource.php

70 lines
1.8 KiB
PHP
Raw Normal View History

2022-08-06 15:39:24 -04:00
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\PaymentMethodsResource\Pages;
use App\Filament\Resources\PaymentMethodsResource\RelationManagers;
use App\Models\PaymentMethods;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
2022-08-07 12:48:05 -04:00
use Filament\Tables\Columns\TextColumn;
use Filament\Forms\Components\TextInput;
2022-08-06 15:39:24 -04:00
class PaymentMethodsResource extends Resource
{
protected static ?string $model = PaymentMethods::class;
protected static ?string $navigationIcon = 'heroicon-o-collection';
2022-08-07 13:07:31 -04:00
protected static ?string $navigationGroup = 'Silent Auction';
2022-08-06 15:39:24 -04:00
public static function form(Form $form): Form
{
return $form
->schema([
2022-09-12 07:57:09 -04:00
TextInput::make('pm_name')
->label('Method Name'),
2022-08-06 15:39:24 -04:00
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
2022-09-12 07:57:09 -04:00
TextColumn::make('pm_name')
->label('Method Name')
->sortable(),
2022-08-06 15:39:24 -04:00
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\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'),
];
}
}