Skip to content

njxqlus/filament-relation-manager-component

Repository files navigation

Use Filament Relation Manager Everywhere!

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

banner

Use Filament Relation Manager Everywhere!

Installation

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"

Usage

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)
            ]),
        ])
    ]);
}

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Use Filament Relation Manager Everywhere!

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •