Download the PHP package mr-timofey/laravel-aio-images without Composer
On this page you can find all versions of the php package mr-timofey/laravel-aio-images. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-aio-images
All-in-one Laravel image processing
This package includes the following:
- images database table migration;
- images Eloquent model;
- controller for uploads and on-the-fly/on-demand image processing/caching;
- service provider.
Any uploaded or generated image is automatically optimized using the spatie/image-optimizer package.
On-the-fly image generation just uses intervention/image package.
Requirements
- PHP 7.1
- Laravel or Lumen 5
Installation
Laravel
Migration will create the aio_images
table which contains a json
field props
.
You can change it to text
if your database does not support JSON/JSONB fields.
Although it is not recommended.
If you want to use storage/app/public
as a place to store all your images (configured by default):
For Laravel <= 5.4 add
Intervention\Image\ImageServiceProvider
,
MrTimofey\LaravelAioImages\ServiceProvider
to your app.providers
config.
See config/aio_images.php
file for a further configuration instructions.
Do not forget to configure aio_images.pipes
!
Lumen
Add Intervention\Image\ImageServiceProviderLumen
, MrTimofey\LaravelAioImages\ServiceProvider
service providers to bootstrap/app.php
.
Copy contents of
config.php
to config/aio_images.php
.
Create a migration php artisan make:migration create_aio_images_table
and copy contents
from here
to the just created migration file (database/migrations/xxxx_xx_xx_xxxxxx_create_aio_images_table
).
See config/aio_images.php
file for a further configuration instructions.
Do not forget to configure aio_images.pipes
!
Predefined routes
route('aio_images.upload')
,POST multipart/form-data
- image uploads handler. Both multiple and single image uploads are supported. Field names does not matter since the controller just usesIlluminate\Http\Request@allFiles()
to get your uploads.route('aio_images.original', $image_id)
- original image path.route('aio_images.pipe', [$pipe, $image_id])
- processed image path.