PHPackages                             simonmarcellinden/mediable - 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. simonmarcellinden/mediable

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

simonmarcellinden/mediable
==========================

Package for upload and store any media files.

1.1.0(4y ago)018MITPHP

Since Jun 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/SimonMarcelLinden/mediable)[ Packagist](https://packagist.org/packages/simonmarcellinden/mediable)[ Docs](https://github.com/simonmarcellinden/mediable)[ RSS](/packages/simonmarcellinden-mediable/feed)WikiDiscussions main Synced 3w ago

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

Mediable for Laravel/Lumen
==========================

[](#mediable-for-laravellumen)

[![Latest Version on Packagist](https://camo.githubusercontent.com/40645f8c5e4e9300b87e9d16ebd77d81f5774a6274083fa7010104602a1fc170/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696d6f6e6d617263656c6c696e64656e2f6d65646961626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/simonmarcellinden/mediable)[![Total Downloads](https://camo.githubusercontent.com/cc24df925b1b7436e30c8f150644d876ede7aae19b07c96d8c6711ed14ed843a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696d6f6e6d617263656c6c696e64656e2f6d65646961626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/simonmarcellinden/mediable)[![Build Status](https://camo.githubusercontent.com/cf19fec35b2af8ea6476ce54efa3a6025a857e0fa673cf00c3caf7e93febd433/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73696d6f6e6d617263656c6c696e64656e2f6d65646961626c652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/simonmarcellinden/mediable)

Laravel-Mediable is a package for easily uploading and attaching media files to models with Laravel/Lumen.

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

[](#installation)

Via Composer

```
$ composer require simonmarcellinden/mediable
```

Register the package's service provider in config/app.php. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.

Open and add the service provider to `bootstrap/app.php`

```
	$app->register(\SimonMarcelLinden\Mediable\MediableServiceProvider::class);
```

### Publish the configurations

[](#publish-the-configurations)

Run this on the command line from the root of your project:

```
$ no config needed

```

Run the migrations to add the required tables to your database.

```
$ php artisan migrate
```

Example Usage
-------------

[](#example-usage)

### Example if you upload need a model for Images

[](#example-if-you-upload-need-a-model-for-images)

Create a eloquent Model and Controller

```
    php artisan make:model Image -c
```

Extend your eloquent model with the model from this package.

```
