hlacos/attachment5

Attachment bundle for laravel 5.1
4,139 1
Install
composer require hlacos/attachment5
Latest Version:0.1.5
PHP:>=5.5.9
Laravel:5
Last Updated:Sep 16, 2019
Links: GitHub  ·  Packagist
Maintainer: Hlacos

Attachment bundle

Laravel 5 bundle for store simply file attachments.

It's under development, not recommended for production use!

Installation

  1. add bundle to composer: "hlacos/attachment5": "dev-master"
  2. composer install / update
  3. add service provider to the providers list: 'Hlacos\Attachment5\Attachment5ServiceProvider'
  4. publish config and migration: php artisan vendor:publish --provider="Hlacos\Attachment5\Attachment5ServiceProvider"
  5. php artisan migrate
  6. create directory: public/attachments
  7. let it write by the web server

Attachments storing in public/attachments directory. To override it:

  1. edit config/attachment5.php

Usage

Override table

Extend Hlacos\Attachment5\Models\Attachment and set the $table attribute.

Set uploadable image required sizes

Extend Hlacos\Attachment5\Models\Attachment and set the $sizes array attribute. In the array sets the width of the required images;

Set max size of the original image

Extend Hlacos\Attachment5\Models\Attachment and set the $originalMaxSize string attribute.

Related models

You can set polymoprhic relations in the realted models.

Contributions

Thanks to David Beyaty (https://github.com/hatja) for the gif resize implementation.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

399,241,428 4,660

Version History

Version Released PHP Laravel License
0.1.5 >=5.5.9 >5.0
0.1.4 >=5.5.9 >5.0
0.1.3 >=5.5.9 >5.0
0.1.2 >=5.5.9 >5.0
0.1.1 >=5.5.9 >5.0