.well-known
app
Console
Exceptions
Filament
Resources
BiddersResource
CarShowCategoryResource
CarShowWinnerResource
CheckoutResource
ItemsResource
JudgesResource
PaymentMethodsResource
PeoplesChoiceResource
VehicleScoresResource
VehiclesResource
Pages
RelationManagers
CarShowWinnerRelationManager.php
VehicleOwnerRelationManager.php
VehicleScoresRelationManager.php
VehicleTypeRelationManager.php
WinningBidsResource
BiddersResource.php
CarShowCategoryResource.php
CarShowWinnerResource.php
CheckoutResource.php
ItemsResource.php
JudgesResource.php
PaymentMethodsResource.php
PeoplesChoiceResource.php
VehicleScoresResource.php
VehiclesResource.php
WinningBidsResource.php
Helpers
Http
Models
Providers
User.php
bootstrap
config
database
public
resources
routes
stats
storage
tests
.env.example
.ftpconfig
.gitattributes
.gitignore
.htaccess.bak
artisan
composer.json
composer.lock
composer.lock.bak
package.json
phpunit.xml
readme.md
server.php
webpack.mix.js
50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\VehiclesResource\RelationManagers;
|
|
|
|
use Filament\Forms;
|
|
use Filament\Resources\Form;
|
|
use Filament\Resources\RelationManagers\RelationManager;
|
|
use Filament\Resources\Table;
|
|
use Filament\Tables;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
|
|
|
class VehicleOwnerRelationManager extends RelationManager
|
|
{
|
|
protected static string $relationship = 'vehicleOwner';
|
|
|
|
protected static ?string $recordTitleAttribute = 'owner';
|
|
|
|
public static function form(Form $form): Form
|
|
{
|
|
return $form
|
|
->schema([
|
|
Forms\Components\TextInput::make('owner')
|
|
->required()
|
|
->maxLength(255),
|
|
]);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return $table
|
|
->columns([
|
|
Tables\Columns\TextColumn::make('owner'),
|
|
])
|
|
->filters([
|
|
//
|
|
])
|
|
->headerActions([
|
|
Tables\Actions\CreateAction::make(),
|
|
])
|
|
->actions([
|
|
Tables\Actions\EditAction::make(),
|
|
Tables\Actions\DeleteAction::make(),
|
|
])
|
|
->bulkActions([
|
|
Tables\Actions\DeleteBulkAction::make(),
|
|
]);
|
|
}
|
|
}
|