lrnzfrr/cake-slim-image

CakeSlimImage plugin for CakePHP

Installs: 18

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:cakephp-plugin

v1.6 2019-06-03 08:28 UTC

This package is auto-updated.

Last update: 2024-04-29 03:47:25 UTC


README

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require lrnzfrr/CakeSlimImage

Use the Plugin

Open Application.php and include the library:

use lrnzfrr\CakeSlimImage\Middleware\CakeSlimImageMiddleware;

and in the middleware Queue:
```php
    public function middleware($middlewareQueue)
    {
        $middlewareQueue
            ... middleware ..
            ->add(new CakeSlimImageMiddleware($this))
            .. other middleware....
    }

The plugins will catch all json post request with "slim" param, single or multi images, so in your controller just write:

    if($this->request->getData('slimImage')) {
        $photoData = $this->request->getData('slimImage');
        // process photo data ... 
    }