https://github.com/njxqlus/filament-relation-manager-component
Use Filament Relation Manager Everywhere!
https://github.com/njxqlus/filament-relation-manager-component
Last synced: about 2 months ago
JSON representation
Use Filament Relation Manager Everywhere!
- Host: GitHub
- URL: https://github.com/njxqlus/filament-relation-manager-component
- Owner: njxqlus
- License: mit
- Created: 2023-09-04T03:40:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-02T21:33:41.000Z (3 months ago)
- Last Synced: 2025-04-12T22:54:26.522Z (about 2 months ago)
- Language: PHP
- Size: 125 KB
- Stars: 31
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Use Filament Relation Manager Everywhere!
[](https://packagist.org/packages/njxqlus/filament-relation-manager-component)
[](https://github.com/njxqlus/filament-relation-manager-component/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/njxqlus/filament-relation-manager-component/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/njxqlus/filament-relation-manager-component)
Use Filament Relation Manager Everywhere!
## Installation
You can install the package via composer:
```bash
composer require njxqlus/filament-relation-manager-component
```Optionally, you can publish the views using
```bash
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.
```php
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](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Mikael Ahabalyants](https://github.com/njxqlus)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.