PHPackages                             lifeentity/images - 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. lifeentity/images

ActiveLibrary

lifeentity/images
=================

0301PHP

Since Sep 27Pushed 11y agoCompare

[ Source](https://github.com/lifeentity/images)[ Packagist](https://packagist.org/packages/lifeentity/images)[ RSS](/packages/lifeentity-images/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Image generation and caching in Laravel
=======================================

[](#image-generation-and-caching-in-laravel)

This Laravel 4 package provides an easy way to generate and cache images on the fly

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

[](#installation)

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `lifeentity/images`.

```
"require": {
    "lifeentity/images": "2.*"
}

```

Next, update Composer from the Terminal:

```
composer update

```

Once this operation completes, the final step is to add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

```
'Lifeentity\Images\ImagesServiceProvider'

```

Next, run this migrate command to create the images table (don't forget to configure your database)

```
php artisan migrate --package=lifeentity/images

```

Optional step, run this artisan command to publish the config file

```
php artisan config:publish lifeentity/images

```

The config file contains information about:

- your images directory
- the base path
- the cache directory name

Usage
-----

[](#usage)

Attach any of your models to the image eloquent model.

```
