PHPackages                             zakariayacine/laramediamover - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. zakariayacine/laramediamover

ActiveLibrary[File &amp; Storage](/categories/file-storage)

zakariayacine/laramediamover
============================

LaraMediaMover is a versatile Laravel package that simplifies the movement and management of multimedia files of all types, including images, videos, and documents. It provides a comprehensive solution for uploading, storage, renaming, and handling files, ensuring a seamless development experience for Laravel projects.

1.0.4(2y ago)317[1 PRs](https://github.com/zakariayacine/LaraMediaMover/pulls)MITPHPPHP ^8.1

Since Sep 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/zakariayacine/LaraMediaMover)[ Packagist](https://packagist.org/packages/zakariayacine/laramediamover)[ Docs](https://github.com/zakariayacine/laramediamover)[ RSS](/packages/zakariayacine-laramediamover/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (3)Used By (0)

LaraMediaMover
==============

[](#laramediamover)

[![lara-Media-Mover-logo](https://camo.githubusercontent.com/cfa07390f756255ea9958744847ce08056cbee39aa9ee9c6682df3473d6be891/68747470733a2f2f692e6962622e636f2f5957595a7431772f6c6172612d4d656469612d4d6f7665722e706e67)](https://camo.githubusercontent.com/cfa07390f756255ea9958744847ce08056cbee39aa9ee9c6682df3473d6be891/68747470733a2f2f692e6962622e636f2f5957595a7431772f6c6172612d4d656469612d4d6f7665722e706e67)

LaraMediaMover is a versatile Laravel package that simplifies the movement and management of multimedia files of all types, including images, videos, and documents. It provides a comprehensive solution for uploading, storage, renaming, and handling files, ensuring a seamless development experience for Laravel projects. [![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/zakariayacine/laramediamover/blob/main/LICENSE)[![Latest Version on Packagist](https://camo.githubusercontent.com/1cf57c08a4ec263ee1fce671caaa31c1b5848b7b7b13f00816dd3100b11b5b40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a616b61726961796163696e652f6c6172616d656469616d6f7665722e737667)](https://packagist.org/packages/zakariayacine/laramediamover)[![Total Downloads](https://camo.githubusercontent.com/f265260dd5994a13d634d3097f9090b50d9ce425a2bf0ba3794dd8d7ee82cf68/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a616b61726961796163696e652f6c6172616d656469616d6f7665722e737667)](https://packagist.org/packages/zakariayacine/laramediamover)

Installation
------------

[](#installation)

You can install this package via Composer by running the following command:

```
composer require zakariayacine/laramediamover
```

The package will automatically register itself.

Next, you should publish the package configuration file using the following command:

```
php artisan vendor:publish --tag=laramediamover-config
```

This will create a `laramediamover.php` configuration file in your `config` directory. You can customize the configuration according to your needs.

Usage
-----

[](#usage)

To use LaraMediaMover, you need to create an instance of the `LaraMediaMover` class and call the `moveFile` method. Here's an example of how to use it:

```
use Zakariayacine\LaraMediaMover\LaraMediaMover;

// Instantiate LaraMediaMover with the file content, extension, and optional parameters
$mediaMover = new LaraMediaMover($fileContent, 'jpg', 'my_image.jpg', 'public');

// Move the file and get its URL
$mediaUrl = $mediaMover->moveFile();

if ($mediaUrl) {
    // The file has been successfully moved, and $mediaUrl contains its URL
    // You can use $mediaUrl as needed in your application
} else {
    // An error occurred during the file move process
    // Handle the error appropriately
}
```

In the above example:

- `$fileContent` is the content of the media file you want to move.
- `'jpg'` is the file extension.
- `'my_image.jpg'` is the desired file name.
- `'public'` is the storage disk you want to use.

You can customize these parameters according to your requirements.

Configuration
-------------

[](#configuration)

You can customize the package's behavior by modifying the `laramediamover.php` configuration file located in your `config` directory. This file allows you to define default settings for the package.

Exceptions
----------

[](#exceptions)

The package may throw a `MediaMoveException` in case of an error during the media move process. You can catch this exception to handle errors gracefully.

```
use Zakariayacine\LaraMediaMover\Exceptions\MediaMoveException;

try {
    // Attempt to move the media file here
} catch (MediaMoveException $e) {
    // Handle the error, log it, or return an error response
}
```

Example URLs with Hashed File Names
-----------------------------------

[](#example-urls-with-hashed-file-names)

To illustrate how the LaraMediaMover package generates URLs with hashed file names, here are some examples using hashed names:

### PDF Files

[](#pdf-files)

- Original File Name: `document.pdf`
- Hashed File Name: `4e76275d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5eaffed001.pdf`
- Storage Path: `PDF/4e76275d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5eaffed001.pdf`
- Generated URL: `https://example.com/storage/PDF/4e76275d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5eaffed001.pdf`

### Images

[](#images)

- Original File Name: `picture.jpg`
- Hashed File Name: `7b5eaffed0014e76275d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5ea.jpg`
- Storage Path: `IMAGES/7b5eaffed0014e76275d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5ea.jpg`
- Generated URL: `https://example.com/storage/IMAGES/7b5eaffed0014e76275d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5ea.jpg`

### Videos

[](#videos)

- Original File Name: `video.mp4`
- Hashed File Name: `5d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5ea5d9d4b3b51.mp4`
- Storage Path: `VIDEOS/5d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5ea5d9d4b3b51.mp4`
- Generated URL: `https://example.com/storage/VIDEOS/5d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5ea5d9d4b3b51.mp4`

### Audio

[](#audio)

- Original File Name: `audio.mp3`
- Hashed File Name: `ea5d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5eaaudio.mp3`
- Storage Path: `AUDIO/ea5d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5eaaudio.mp3`
- Generated URL: `https://example.com/storage/AUDIO/ea5d9d4b3b51c1ab9a44d5c0c15399d02889163361749e1645aa27b5eaaudio.mp3`

### Other Files

[](#other-files)

- Original File Name: `other.docx`
- Hashed File Name: `1c1ab9a44d5c0c15399d02889163361749e1645aa27b5eaaother.docx`
- Storage Path: `OTHER/1c1ab9a44d5c0c15399d02889163361749e1645aa27b5eaaother.docx`
- Generated URL: `https://example.com/storage/OTHER/1c1ab9a44d5c0c15399d02889163361749e1645aa27b5eaaother.docx`

These examples showcase how the LaraMediaMover package generates URLs with hashed file names for different types of media files based on their extensions and storage paths. The hashed file names provide security and uniqueness to each file.

License
-------

[](#license)

This package is open-sourced software licensed under the MIT license.

Please customize this README to include specific instructions, details, or additional information related to your package. Replace the placeholder content with actual package details, usage instructions, and license information.

For more information and updates, visit the [LaraMediaMover GitHub repository](https://github.com/zakariayacine/laramediamover).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

990d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/527d2713c07489dfdea0cdbe55353b7b0ea7a116c76e2f58e74a89105266f4ee?d=identicon)[zakariayacine](/maintainers/zakariayacine)

---

Top Contributors

[![zakariayacine](https://avatars.githubusercontent.com/u/62550306?v=4)](https://github.com/zakariayacine "zakariayacine (11 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelzakariayacinelaramediamover

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/zakariayacine-laramediamover/health.svg)

```
[![Health](https://phpackages.com/badges/zakariayacine-laramediamover/health.svg)](https://phpackages.com/packages/zakariayacine-laramediamover)
```

###  Alternatives

[spatie/livewire-filepond

Upload files using Filepond in Livewire components

306452.7k3](/packages/spatie-livewire-filepond)[elegantly/laravel-invoices

Store invoices safely in your Laravel application

23131.8k](/packages/elegantly-laravel-invoices)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[mwguerra/filemanager

A full-featured file manager package for Laravel and Filament v5 with dual operating modes, drag-and-drop uploads, S3/MinIO support, and comprehensive security features.

718.5k1](/packages/mwguerra-filemanager)[codebar-ag/laravel-flysystem-cloudinary

Cloudinary Flysystem v1 integration with Laravel

1224.9k2](/packages/codebar-ag-laravel-flysystem-cloudinary)[kalynasolutions/laravel-tus

Laravel package for handling resumable file uploads with tus protocol and native Uppy.js support without additional tus servers

5261.8k1](/packages/kalynasolutions-laravel-tus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
