Package Data | |
---|---|
Maintainer Username: | neilcrookes |
Maintainer Contact: | neil.crookes@fivebyfiveuk.com (Neil Crookes) |
Package Create Date: | 2014-01-23 |
Package Last Update: | 2014-01-23 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-09 03:01:49 |
Package Statistics | |
---|---|
Total Downloads: | 197 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
A Laravel 4 package for adding a carousel to a website
Add the following to you composer.json file
"fbf/laravel-carousel": "dev-master"
Run
composer update
Add the following to app/config/app.php
'Fbf\LaravelCarousel\LaravelCarouselServiceProvider'
Publish the config
php artisan config:publish fbf/laravel-carousel
Run the migration
php artisan migrate --package="fbf/laravel-carousel"
Create the relevant image upload directories that you specify in your config, e.g.
public/uploads/packages/fbf/laravel-carousel/background/original
public/uploads/packages/fbf/laravel-carousel/background/resized
public/uploads/packages/fbf/laravel-carousel/icon/original
public/uploads/packages/fbf/laravel-carousel/icon/resized
In your controller
$panels = Fbf\LaravelCarousel\Panel::getData();
return View::make('home')->with(compact('panels'));
In your blade template:
@inlcude('laravel-carousel::carousel')
You can use the excellent Laravel Administrator package by frozennode to administer your carousel.
http://administrator.frozennode.com/docs/installation
A ready-to-use model config file for the Panel model (carousel_panels.php) is provided in the src/config/administrator directory of the package, which you can copy into the app/config/administrator directory (or whatever you set as the model_config_path in the administrator config file).