matteoantoci / phpthumb
Easy thumbnailing in Laravel 4
Installs: 131
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/matteoantoci/phpthumb
Requires
- php: >=5.3.0
- illuminate/support: ~4
This package is not auto-updated.
Last update: 2025-11-04 08:52:34 UTC
README
This is the phpThumb library wrapped inside a Laravel 4 package.
Installation
Add this package to your composer.json
Add this service provider in /app/config/app.php
'Matteoantoci\Phpthumb\PhpthumbServiceProvider',
Use
A new route will be created /phpthumb
Use the library as described here
phpThumb Helper
Add this alias in /app/config/app.php to use phpThumb Helper in your templates.
'phpThumb' => 'Matteoantoci\Phpthumb\PhpthumbHelper'
The helper class consist on a single static function with this parameters:
get($img, $w = "", $h = "", $crop = true, $params = array())
- $img -> path of image
- $w -> max width
- $h -> max height
- $crop -> if you want to use zoom-crop feature (true by default)
- $params -> array of additional parameters. Eg: 'fltr[]=gray'