2017 © Pedro Peláez
 

library phpthumb

PHPThumb Package for Laravel 4

image

mews/phpthumb

PHPThumb Package for Laravel 4

  • Wednesday, December 31, 2014
  • by mewebstudio
  • Repository
  • 3 Watchers
  • 12 Stars
  • 1,085 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

PHPThumb for Laravel 4

A simple Laravel 4 service provider for including the PHPThumb for Laravel 4., (*1)

Installation

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)

Usage

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',
    )

Example


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)

The Versions

31/12 2014

dev-master

9999999-dev http://github.com/mewebstudio/Phpthumb

PHPThumb Package for Laravel 4

  Sources   Download

MIT

The Requires

 

laravel laravel 4 image thumbnail thumb l4 phpthumb