Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Entity File Bundle

Entity File Bundle Laravel Package

2lenet/entity-file-bundle

EntityFileBundle lets Symfony entities attach and manage files through configurable FlySystem storage adapters, with simple save, retrieve, access, delete, rename, and move operations via a per-configuration manager.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Entity File Bundle
Does 2lenet/entity-file-bundle work with Laravel Eloquent?
No, it does not work with Eloquent out of the box. The bundle is built around Doctrine entities and Symfony-style configuration, so Laravel apps using Eloquent would need a Doctrine bridge or a custom integration layer. For Eloquent-only projects, native file models with Laravel Storage or a package like spatie/laravel-medialibrary is usually a better fit.
How do I install 2lenet/entity-file-bundle in a Laravel project?
Install it with Composer using composer require 2lenet/entity-file-bundle. Because it is a Symfony bundle rather than a Laravel package, you should expect to register its services manually and provide an lle_entity_file.yaml configuration. You will also need Doctrine ORM and the relevant Symfony components available in the application.
Which Laravel versions are supported by this package?
There is no documented Laravel version support because the package targets Symfony, not Laravel. Compatibility depends on the Symfony components, Doctrine ORM, and FlySystem versions it requires rather than on a Laravel release number. Test it in a pilot branch before relying on it in a Laravel application.
Can I use S3 or another cloud storage backend instead of the default local storage?
Yes, storage is handled through FlySystem adapters, so you can configure S3, FTP, local disks, or other adapters and point the storage_adapter setting at them. The default local adapter stores files under data/seller_logos, which is not ideal for cloud-native deployments. The bundle does not read Laravel's config/filesystems.php directly, so you must configure the FlySystem adapter separately.
How do I attach a file to an entity with this bundle?
First retrieve the manager for your configuration using EntityFileLoader, for example get('seller_logos'). Then call the manager's save method with the entity, file data, and path, and persist plus flush the returned EntityFile with Doctrine. The file data can be a string, a Symfony File or UploadedFile object, or a resource.
Do I need Doctrine ORM to use 2lenet/entity-file-bundle?
Yes, the bundle assumes Doctrine entities and uses an EntityFile entity that implements EntityFileInterface. Laravel can run Doctrine through a bridge package, but that adds architectural complexity compared with Eloquent. If your app is Eloquent-first, this bundle is probably not the simplest choice.
How are file validation, MIME types, and upload security handled?
The provided documentation does not describe built-in validation, MIME checking, or size limits. The bundle focuses on storing files and associating them with entities, so upload validation and authorization should be implemented in your application layer. Treat any uploaded file as untrusted and add your own checks before calling the manager.
Can I add extra metadata or custom properties to attached files?
Yes, you can use your own Doctrine entity class as long as it implements EntityFileInterface. The bundle provides an EntityFileTrait to reduce boilerplate, and you update the configuration to reference your custom class. This lets you add fields such as captions, alt text, or ownership metadata.
Is 2lenet/entity-file-bundle actively maintained and safe for production?
It is MIT licensed and the last release in 2026 suggests some ongoing activity, but it has low stars and few dependents. That means community support and real-world testing are unproven, and there is no corporate backing or SLA. Run a pilot and review the code before using it in a production Laravel system.
What are the best alternatives for file attachments in Laravel?
For Eloquent applications, a native File model with a hasMany relationship and the Storage facade covers many use cases. spatie/laravel-medialibrary is a more Laravel-native package for associating media with models. Consider this bundle only if you are already using Doctrine and want Symfony-style entity-file configuration.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator