Looking to hire Laravel developers? Try LaraJobs

laravel-eloquent-files maintained by shridharkaushik29

Description
File Handling with Eloquent Models in Laravel
Last update
2024/11/11 08:10 (2.0.x-dev)
License
Links
Downloads
283

Comments
comments powered by Disqus

Eloquent Files

Installation using Composer:

composer require shridharkaushik29/laravel-eloquent-files

Usage:

In your eloquent model use \Shridhar\EloquentFiles\HasFile trait and create a method for accessing file like below:

Here "image_path" is the attribute/column name on which you want to assign the path of the uploaded file, default is "file_path".

The second argument accepted by the file_info() method is the array of the following options.