2017 © Pedro Peláez
 

library eloquent_filefield

Automatically save files assigned to eloquent model attributes

image

jaysson/eloquent_filefield

Automatically save files assigned to eloquent model attributes

  • Sunday, September 11, 2016
  • by jaysson
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,310 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 18 % Grown

The README.md

Eloquent File Field

Easily upload files to a directory and save the filename to database attribute., (*1)

It does not handle any image processing. Take a look at [Glide][http://glide.thephpleague.com] for that., (*2)

Install

Via Composer, (*3)

$ composer require jaysson/eloquent_filefield

Usage

In your Eloquent model:, (*4)

use Jaysson\EloquentFileField\FileFieldTrait;

public $fileFields = [
  'image' => [],
  'poster' => [
    'disk' => app('config')->get('filesystems.default'),
    'path' => 'uploads/:class_slug/:attribute/:unique_id-:file_name',
    'default_path' => 'uploads/default.png'
  ]
];

Each field can have filesystem disk, path pattern and default path options. If you don't specify any of them, they will be loaded from default config., (*5)

Publish default config

$ php artisan vendor:publish 

Security

If you discover any security related issues, please email prabhakarbhat@live.com instead of using the issue tracker., (*6)

License

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

The Versions

11/09 2016

dev-master

9999999-dev https://github.com/jaysson/eloquent_filefield

Automatically save files assigned to eloquent model attributes

  Sources   Download

MIT

The Requires

 

laravel file upload jaysson eloquent_filefield

11/09 2016

1.0.1

1.0.1.0 https://github.com/jaysson/eloquent_filefield

Automatically save files assigned to eloquent model attributes

  Sources   Download

MIT

The Requires

 

laravel file upload jaysson eloquent_filefield

25/03 2016

1.0

1.0.0.0 https://github.com/jaysson/eloquent_filefield

Automatically save files assigned to eloquent model attributes

  Sources   Download

MIT

The Requires

 

laravel file upload jaysson eloquent_filefield