novius/laravel-backpack-slideshow

Admin interface for managing slideshow

0.2.0 2020-03-23 09:39 UTC

This package is not auto-updated.

Last update: 2021-10-04 16:45:51 UTC


README

Travis Packagist Release Licence

Admin interface for managing slideshow

Installation

In your terminal:

composer require novius/laravel-backpack-slideshow

In config/app.php, add:

\Novius\Backpack\Slideshow\SlideshowServiceProvider::class,
\Spatie\MediaLibrary\MediaLibraryServiceProvider::class,

Run

php artisan vendor:publish --provider="Novius\Backpack\Slideshow\SlideshowServiceProvider" --tag="routes"
php artisan vendor:publish --provider="Novius\Backpack\Slideshow\SlideshowServiceProvider" --tag="lang"
php artisan vendor:publish --provider="Novius\Backpack\Slideshow\SlideshowServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="Novius\Backpack\Slideshow\SlideshowServiceProvider" --tag="views"
php artisan vendor:publish --provider="Novius\Backpack\Slideshow\SlideshowServiceProvider" --tag="config"

php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="migrations"

php artisan migrate

Usage & Features

Integration on admin panel:

Add code bellow to : resources/views/vendor/backpack/base/inc/sidebar.blade.php

<li>
  <a href="{{ route('crud.slideshow.index') }}" title="">
    <i class="fa fa-picture-o"></i>
    <span>{{ trans('backpack_slideshow::slideshow.slideshow') }}</span>
  </a>
</li>

You can go and create your slideshow.

Then you can display your slideshow like this:

// The function "display" takes one parameter:
//  1. Slug => Identifies the slideshow
<?php echo \Novius\Backpack\Slideshow\Models\Slideshow::display('slugOfMySlideshow'); ?>

Feel free to override the base view to suit your needs.

/resources/views/vendor/laravel-backpack-slideshow/slider.blade.php

Testing

Run the tests with:

./test.sh

Lint

Run php-cs with:

./cs.sh

Contributing

Contributions are welcome! Leave an issue on Github, or create a Pull Request.

Licence

This package is under GNU Affero General Public License v3 or (at your option) any later version.