Use Filament Relation Manager Everywhere!
You can install the package via composer:
composer require njxqlus/filament-relation-manager-component
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-relation-manager-component-views"
Example below shows how to use different relation managers in tabs without lazy load.
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Tabs::make()->tabs([
Forms\Components\Tabs\Tab::make('Versions')->schema([
\Njxqlus\Filament\Components\Forms\RelationManager::make()->manager(RelationManagers\VersionsRelationManager::class)->lazy(false)
]),
Forms\Components\Tabs\Tab::make('Stands')->schema([
\Njxqlus\Filament\Components\Forms\RelationManager::make()->manager(RelationManagers\StandsRelationManager::class)->lazy(false)
]),
Forms\Components\Tabs\Tab::make('Contexts')->schema([
\Njxqlus\Filament\Components\Forms\RelationManager::make()->manager(RelationManagers\ContextsRelationManager::class)->lazy(false)
]),
])
]);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist->schema([
Infolists\Components\Tabs::make()->tabs([
Infolists\Components\Tabs\Tab::make('Versions')->schema([
\Njxqlus\Filament\Components\Infolists\RelationManager::make()->manager(RelationManagers\VersionsRelationManager::class)->lazy(false)
]),
Infolists\Components\Tabs\Tab::make('Stands')->schema([
\Njxqlus\Filament\Components\Infolists\RelationManager::make()->manager(RelationManagers\StandsRelationManager::class)->lazy(false)
]),
Infolists\Components\Tabs\Tab::make('Contexts')->schema([
\Njxqlus\Filament\Components\Infolists\RelationManager::make()->manager(RelationManagers\ContextsRelationManager::class)->lazy(false)
]),
])
]);
}
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.