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

81 lines
2.2 KiB
PHP
Raw Normal View History

2022-08-06 15:39:24 -04:00
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\ItemsResource\Pages;
use App\Filament\Resources\ItemsResource\RelationManagers;
use App\Models\Items;
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\BooleanColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
2022-08-06 15:39:24 -04:00
class ItemsResource extends Resource
{
protected static ?string $model = Items::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([
//
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
2022-09-04 13:57:38 -04:00
TextColumn::make('item_assigned_num')
->label('Item Number')
->sortable(),
TextColumn::make('item_desc')
->label('Description'),
TextColumn::make('item_min_bid')
->label('Minimum Bid')
->money('usd', 'true')
->sortable(),
TextColumn::make('item_est_value')
->label('Estimated Value')
->money('usd', 'true')
->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\ListItems::route('/'),
'create' => Pages\CreateItems::route('/create'),
'edit' => Pages\EditItems::route('/{record}/edit'),
];
}
}