Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Latest commit

 

History

History
62 lines (45 loc) · 1.07 KB

readme.md

File metadata and controls

62 lines (45 loc) · 1.07 KB

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.