Download the PHP package shridharkaushik29/laravel-eloquent-files without Composer
On this page you can find all versions of the php package shridharkaushik29/laravel-eloquent-files. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download shridharkaushik29/laravel-eloquent-files
More information about shridharkaushik29/laravel-eloquent-files
Files in shridharkaushik29/laravel-eloquent-files
Download shridharkaushik29/laravel-eloquent-files
More information about shridharkaushik29/laravel-eloquent-files
Files in shridharkaushik29/laravel-eloquent-files
Vendor shridharkaushik29
Package laravel-eloquent-files
Short Description File Handling with Eloquent Models in Laravel
License MIT
Package laravel-eloquent-files
Short Description File Handling with Eloquent Models in Laravel
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-eloquent-files
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:
<?php namespace App\Model; use Illuminate\Database\Eloquent\Model; class Member extends Model { use \Shridhar\EloquentFiles\HasFile; function getImageAttribute() { return $this->file_info("image_path"); } }
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.
Name | Value |
---|---|
All versions of laravel-eloquent-files with dependencies
PHP Build Version
Package Version
Requires
laravel/framework Version
6.0.*
The package shridharkaushik29/laravel-eloquent-files contains the following files
Loading the files please wait ....