New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

van-ons/laravel-attachment-library

A Laravel library for attaching files to Eloquent models.
11,182 3

Larablocks Analysis

van-ons/laravel-attachment-library works with Laravel 10 to 13 (latest release v1.7.4, Oct 20, 2026).

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Oct 20, 2026)
  • 1,624 downloads a month (needs 10,000)
  • 3 GitHub stars (needs 100)

State

Actively maintained
  • Last stable release: Oct 20, 2026.
  • 24 releases in the last 12 months.
  • First released: Jul 3, 2024.
  • Monthly downloads: 1,624.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.

Install
composer require van-ons/laravel-attachment-library
Latest Version:v1.7.4
PHP:^8.2
Laravel:10 – 13
License:MIT
Last Updated:Nov 27, 2026
Links: GitHub  ·  Packagist
Maintainer: vanons

Social card of Laravel Attachment Library

Laravel Attachment Library

Latest version on GitHub Total downloads GitHub issues License Plumb score

A Laravel library for attaching files to Eloquent models.

Quick start

Installation

The Laravel Attachment Library can be installed using Composer by running the following command:

$ composer require van-ons/laravel-attachment-library

After downloading the dependency, run the following command to install all the migrations and assets:

$ php artisan attachment-library:install 

Usage

To enable file attachments in your Eloquent models, add the HasAttachments trait to your model class:

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use VanOns\LaravelAttachmentLibrary\Concerns\HasAttachments;

class ModelName extends Model
{
    use HasAttachments;
    
    // ...
}

After that you should be able to link attachments to your model as follows:

// Retrieve attachment.
$attachment = \VanOns\LaravelAttachmentLibrary\Models\Attachment::find($attachmentId);

// Retrieve your model.
$myModel = ModelName::find($modelId);

// Link attachment to your model.
$myModel->attachments()->attach($attachment);

Documentation

Please see the documentation for detailed information about installation and usage.

Contributing

Please see Contributing for more information about how you can contribute.

Changelog

Please see Changelog for more information about what has changed recently.

Upgrading

Please see Upgrading for more information about how to upgrade.

Security

Please see Security for more information about how we deal with security.

Credits

We would like to thank the following contributors for their contributions to this project:

License

The scripts and documentation in this project are released under the MIT License.


Logo of Van Ons

Related Packages

van-ons/filament-attachment-library

A Filament library for attaching files to Eloquent models.

9,998 11
aniftyco/laravel-attachments

Turn any field on your Eloquent models into attachments

1,238 13
outrightvision/api-model

Generate Laravel-like Api Models

124,331 4
jimbolino/laravel-model-builder

builds eloquent models based on the tables and relations found in your mysql dat...

12,044 30
egeatech/laravel-models

A package to better handle database operations via Eloquent Models.

3,993 1

Version History

Version Released PHP License
v1.7.4 ^8.2 MIT
v1.7.3 ^8.2 MIT
v1.7.2 ^8.2 MIT
v1.7.1 ^8.2 MIT
v1.7.0 ^8.2 MIT
Pre-releases (3)
Version Released PHP License
v1.0.0-rc3 ^8.2 MIT
v1.0.0-rc2 ^8.2 MIT
v1.0.0-rc1 ^8.2 MIT