koyanyaroo/laravel-imageable

A Simple upload library for laravel

v0.0.2 2020-09-03 23:46 UTC

This package is auto-updated.

Last update: 2024-05-04 07:56:58 UTC


README

This package allows you to easily handle image upload in laravel.

Installation

You can install the package via composer:

composer require koyanyaroo/laravel-imageable

Introduction

Introduction here

Usage

Define your model

    use Koyanyaroo\Imageable;

    ...
    
    /**
     * @var string upload directory 
     */
    protected $uploadDir = '';

   /**
        * Define an array of filter that allowed to use for this model
        * `key` as class name and `value` as field name(s)
        *
        * @var array
        */
       protected $imageableField = [
           'image',
           'image_hero' => [
               'thumb' => [
                   380, // widht
                   253, // height
               ],
           ],
       ];

Credits

License

The MIT License (MIT). Please see License File for more information.