PHPackages                             bociancz/gallery-module - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bociancz/gallery-module

ActiveAsgard-module[Utility &amp; Helpers](/categories/utility)

bociancz/gallery-module
=======================

Gallery management in AsgardCMS

v3.0.1(7y ago)0636[3 issues](https://github.com/BocianCZ/gallery-module/issues)MITPHPPHP &gt;=5.6

Since Feb 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/BocianCZ/gallery-module)[ Packagist](https://packagist.org/packages/bociancz/gallery-module)[ RSS](/packages/bociancz-gallery-module/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (5)Versions (5)Used By (0)

Gallery Module for AsgardCMS
============================

[](#gallery-module-for-asgardcms)

Special Thanks
--------------

[](#special-thanks)

to Nicolas Widart for AsgardCMS

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

[](#installation)

You can install Gallery module using composer: `composer require bociancz/gallery-module`

After the module is installed, you have to give yourself access in AsgardCMS (using Roles/Permissions). New Gallery item will appear in the Sidebar.

Prerequisites
-------------

[](#prerequisites)

Gallery module by default uses Bootstrap 4 grid system and `img-fluid` classes to render gallery thumbnmails. If your frontend theme does not use bootstrap, you can load bootstrap CSS from CDN  (bootstrap JavaScript is not needed).
Alternatively, you can use your own blade template to render gallery or switch to the Bootstrap 3 template also provided with the library (see Advanced Usage)

Usage (basic)
-------------

[](#usage-basic)

You can use Gallery module administration to create galleries using photos uploaded through Media module. Each gallery will generate a short code snippet that you can copy and paste either into the blade template, or into any page or article (created for example using Page or Blog module).

#### Register Middleware

[](#register-middleware)

In order for the code snippet to be transformed into gallery HTML code, you need to register `RenderGallery` middleware to the routes you want gallery module to kick in.

This can be done globally by editing `app/Http/Kernel.php` file and adding `\Modules\Gallery\Http\Middleware\RenderGallery::class`into the `$middlewareGroups` `web` group (this way, gallery will automatically render in all `web` routes on frontend):

```
