dev-master
9999999-dev http://github.com/mewebstudio/PhpthumbPHPThumb Package for Laravel 4
MIT
The Requires
- php >=5.3.0
- illuminate/support >=4.0
laravel laravel 4 image thumbnail thumb l4 phpthumb
Wallogit.com
2017 © Pedro Peláez
PHPThumb Package for Laravel 4
A simple Laravel 4 service provider for including the PHPThumb for Laravel 4., (*1)
The PHPThumb Service Provider can be installed via Composer by requiring the
mews/phpthumb package and setting the minimum-stability to dev (required for Laravel 4) in your
project's composer.json., (*2)
{
"require": {
"laravel/framework": "4.0.*",
"mews/phpthumb": "dev-master"
},
"minimum-stability": "dev"
}
Update your packages with composer update or install with composer install., (*3)
To use the PHPThumb Service Provider, you must register the provider when bootstrapping your Laravel application. There are essentially two ways to do this., (*4)
Find the providers key in app/config/app.php and register the PHPThumb Service Provider., (*5)
'providers' => array(
// ...
'Mews\Phpthumb\PhpthumbServiceProvider',
)
class ImageController extends Controller { public function getIndex() { $file = base_path() . '/test.jpg'; //$file = 'http://phpthumb.gxdlabs.com/wp-content/themes/phpthumb/images/header_bg.png'; App::make('phpthumb') ->create('crop', array($file, 'center', 200, 200)) //->create('crop', array($file, 'basic', 100, 100, 300, 200)) //->create('resize', array($file, 400, 400, 'adaptive')) //->rotate(array('degree', 180)) ->reflection(array(40, 40, 80, true, '#a4a4a4')) //->save(base_path() . '/', 'aaa.jpg'); ->show(); } }
^_^, (*6)
PHPThumb Package for Laravel 4
MIT
laravel laravel 4 image thumbnail thumb l4 phpthumb