PHPackages                             laraveljutsu/laravel-artifact - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. laraveljutsu/laravel-artifact

ActiveLibrary[Image &amp; Media](/categories/media)

laraveljutsu/laravel-artifact
=============================

Artifact — Lightweight package that just handles basic media management with no fuss.

v1.0.0(8mo ago)2111.8k↓41.7%6[2 issues](https://github.com/ludoguenet/laravel-artifact/issues)[2 PRs](https://github.com/ludoguenet/laravel-artifact/pulls)MITPHPPHP ^8.2

Since Aug 25Pushed 5mo agoCompare

[ Source](https://github.com/ludoguenet/laravel-artifact)[ Packagist](https://packagist.org/packages/laraveljutsu/laravel-artifact)[ RSS](/packages/laraveljutsu-laravel-artifact/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

 [![Laravel Artifact Logo](art/logo.png)](art/logo.png)

 [ ![Latest Version on Packagist](https://camo.githubusercontent.com/5f026270d130962d25ecf291d08f99d9a76dce55e7533f3af722e0764824f681/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c6a757473752f6c61726176656c2d61727469666163742e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/laraveljutsu/laravel-artifact) [ ![Laravel Version](https://camo.githubusercontent.com/a4411156f5df8613bcb79d58e5bbdce9bce8a73378d7a861818b46f7d87e7dc2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e302532422d4646324432303f7374796c653d666c6174266c6f676f3d6c61726176656c) ](https://laravel.com) [ ![Total Downloads](https://camo.githubusercontent.com/48d6d79ba22cf0cee54a8ecfeab36b2b7d36ab480650a9a1cb53e7f71ee27eee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c6a757473752f6c61726176656c2d61727469666163742e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/laraveljutsu/laravel-artifact) [ ![License](https://camo.githubusercontent.com/a025a1fad747dc65b7718e917d328da2e059648c991774bc3e2772403a5a642b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c61726176656c6a757473752f6c61726176656c2d61727469666163743f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/laraveljutsu/laravel-artifact)

---

**Laravel Artifact** is a lightweight package for media management in Laravel applications. It makes file uploads, storage, and retrieval easy — with support for public/private disks, signed URLs, and automatic deduplication.

✨ Features
----------

[](#-features)

- Simple file upload and storage management
- Support for multiple storage disks (local, S3, etc.)
- Automatic deduplication to prevent duplicate files
- Signed URLs for secure file access
- Clean one-to-one and one-to-many file relationships
- Automatic metadata tracking (filename, MIME type, size)

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require laraveljutsu/laravel-artifact
```

Publish the configuration and run migrations:

```
php artisan vendor:publish --tag="laravel-artifact"
```

🚀 Usage
-------

[](#-usage)

### 1. Configure the package

[](#1-configure-the-package)

Configure the package in the `config/artifact.php` file.

```
return [
    'model' => LaravelJutsu\Artifact\Artifact::class,
    'table_name' => 'artifacts',
    'routes' => [
        'prefix' => env('ARTIFACT_ROUTE_PREFIX', 'artifacts'),
        'middleware' => ['web'],
    ],
    'signed_url' => [
        'expiration_minutes' => env('ARTIFACT_SIGNED_URL_EXPIRATION', 60),
    ],
];

// .env
ARTIFACT_ROUTE_PREFIX=artifacts
ARTIFACT_SIGNED_URL_EXPIRATION=60
```

After configuring the package, run the migrations:

```
php artisan optimize
php artisan migrate
```

### 2. Add the trait to your model

[](#2-add-the-trait-to-your-model)

```
