Download the PHP package mabasic/gallery-loader without Composer
On this page you can find all versions of the php package mabasic/gallery-loader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package gallery-loader
Gallery Loader
Laravel facade that gets images from a folder sorted by filename and filtered.
This is just a simple wrapper for functionality that I use across many projects.
It enables you to easily grabs images from a folder and create a image gallery.
Installation
From project root type:
or in composer.json
add following to require
:
Register Service provider in app.php
:
Register Facade in app.php
:
Usage
Get all images from a folder
Get all images except images that contain these words
Helpers
getImageNameWithPrefix($prefix, SplFileInfo $image)
image.png
with prefix thumb_
transforms to thumb_image.png
.
getImageNameWithSuffix(SplFileInfo $image, $suffix)
image.png
with suffix _thumb
transforms to image_thumb.png
.
getImageWithSuffix(SplFileInfo $image, $suffix, $folder)
Returns URL for image with suffix.
getImageWithPrefix(SplFileInfo $image, $prefix, $folder)
Returns URL for image with prefix.
getImage(SplFileInfo $image, $folder)
Returns URL for image.
Real World Example
All versions of gallery-loader with dependencies
illuminate/support Version ~4.0|~5.0
illuminate/filesystem Version ~4.0|~5.0