Jeroen-G / laravel-photo-gallery

A photo gallery for Laravel
40 stars 32 forks source link

Laravel Photo Gallery

A photo gallery for Laravel 4.2

Scrutinizer Code Quality Latest Stable Version

Installation

First you should install this package through Composer and edit your project's composer.json:

"require": {
    "laravel/framework": "4.2.*",
    "jeroen-g/laravel-photo-gallery": "1.*"
}

Next, update Composer via the command line:

composer update

The next step is to add the service provider in app/config/app.php:

'JeroenG\LaravelPhotoGallery\LaravelPhotoGalleryServiceProvider',

The last thing to do is to migrate:

php artisan migrate --package="jeroen-g/laravel-photo-gallery"

This will create the tables for the gallery. Now you're ready to start! Visit /gallery on your host to view the Photo Gallery.

Usage

Photos

The photos will be uploaded to the folder public/uploads/photos/.

Views

If you want to change the way the gallery looks, use this command:

php artisan view:publish jeroen-g/laravel-photo-gallery

Now you can edit the views for the gallery in the app/views/packages/jeroen-g/laravel-photo-gallery directory.

Config

There are a few settings you could change in a configuration file. To set these values, use this command:

php artisan config:publish jeroen-g/laravel-photo-gallery

The configuration file can now be found inside app/config/packages/

Flickr

If you want to use the Flickr API you have to take a few extra steps: