fanswoo/attachment

There is no license information available for the latest version (dev-develop) of this package.

fanswoo attachment

dev-develop 2025-04-22 18:06 UTC

This package is auto-updated.

Last update: 2025-04-23 13:28:53 UTC


README

Fanswoo/Attachment for Filament

This package provides files and pictures upload manager. it can also support Filament forms field.

Requirements

  • Laravel v11
  • Filament v3

Installation

You can install the package via composer:

composer require fanswoo/attachment

After that run the vendor:publish command:

php artisan vendor:publish --provider=FF\\Attachment\\Attachment\\AttachmentProvider --tag=migrations

This will publish the migrations from fanswoo/attachment

And run migrates

php artisan migrate

Usage

Files usage

In you Model add FF\Attachment\Relations\CanRelateFile trait

use Illuminate\Database\Eloquent\Model;
use FF\Attachment\Relations\CanRelateFile;

class Record extends Model
{
    use CanRelateFile;
}

Pics usage

In you Model add FF\Attachment\Relations\CanRelatePic trait

use Illuminate\Database\Eloquent\Model;
use FF\Attachment\Relations\CanRelatePic;

class Record extends Model
{
    use CanRelatePic;
}