Download the PHP package victorscatolon/filament-attachment-library without Composer

On this page you can find all versions of the php package victorscatolon/filament-attachment-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-attachment-library

Filament Attachment Library

Filament Attachment Library is a Laravel package that enables a polymorphic morphMany relationship to handle file attachments across multiple Eloquent models. Seamlessly integrated with Filament, it offers a clean, reusable, and consistent approach to managing file uploads through Filament resource forms and tables—making attachment handling simple and scalable across your application.

🚀 Installation

Install the package via Composer:

Then publish the package's migration files:

⚙️ Configuration

  1. Create your model If you haven’t already, create a new Eloquent model:

  2. Enable attachments on your model Add the InteractsWithAttachments trait to your model to define the polymorphic relationship:

  3. Add the file upload field to your Filament form In your Filament resource's form method, include the AttachmentLibraryFileUpload component to allow users to upload files:

  4. Enable attachment handling in the CreateRecord component To ensure attachments are saved properly when creating a new model, use the HandleAttachments trait in your CreateRecord class:

CreateRecord component

  1. Enable attachment handling in the EditRecord component Likewise, use the HandleAttachments trait in your EditRecord class to manage attachments during updates:

EditRecord component

🗂️ Relation Managers

To use the Attachment Library within a Relation Manager form, follow these steps:

  1. Use the HandleAttachments trait Add the HandleAttachments trait to your RelationManager class:

  2. Set dehydrated(true) on the file upload field Make sure the attachment field is dehydrated so that the file data is available during form processing:

  3. Add a custom create action to the table You’ll need to define a custom CreateAction with an after() callback to manually handle the attachments after the record is created:

✅ Note: Make sure the field name in the $data array matches the field key used in the AttachmentLibraryFileUpload::make() definition.

📦 Changelog

For a detailed list of recent changes, updates, and improvements, please refer to the Changelog.

🤝 Contributing

Contributions are welcome! To get started, please read the Contribution Guide.

👨‍💻 Credits

Developed and maintained by @victorscatolon.
Thanks to all the amazing contributors who help improve this package.

📄 License

This project is open-source software licensed under the MIT License.


All versions of filament-attachment-library with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^9.0 || ^10.0 || ^11.0 || ^12.0
filament/support Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package victorscatolon/filament-attachment-library contains the following files

Loading the files please wait ....