johan-code/image-thumbs

This package is abandoned and no longer maintained. No replacement package was suggested.

trait for create image thumbs for models via InterventionImage

v1.2.1 2018-03-04 16:26 UTC

This package is auto-updated.

Last update: 2020-11-06 13:38:45 UTC


README

This package is not maintained now

Laravel image thumbs

Trait for create image thumbs for models via InterventionImage.

Install on Laravel 5.5

  1. Install using composer (run in your terminal):
composer require johan-code/image-thumbs
  1. Publish (run in your terminal):
php artisan vendor:publish --provider="JohanCode\ImageThumbs\ServiceProvider"
  1. Set name of disk for uploading in /config/image-thumbs.php:
return [
    'disk_name' => 'public'
];
  1. Make sure the disk for uploading exist and available in public.

Example config /config/filesystems.php

'disks' => [
    ...
    'public' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),
        'url' => '/storage',
    ],
    ...
],

Use laravel command for create symlink (run in your terminal):

php artisan storage:link

Install on Laravel 5.4

Add service provider in config/app.php:

'providers' => [
    ...
    JohanCode\ImageThumbs\ServiceProvider::class,
    ...
]

... and follow main instruction.