Download the PHP package msieprawski/eloquent-photos without Composer
On this page you can find all versions of the php package msieprawski/eloquent-photos. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package eloquent-photos
Eloquent Photos
About
This package has been created for everyone which has photos related to any eloquent models in projects.
Compatibility
Currently this package has been tested and developed for Laravel 5.3 or greater.
Installation
composer require msieprawski/eloquent-photos
- Add package service provider in your
config/app.php
file:Msieprawski\EloquentPhotos\EloquentPhotosServiceProvider::class,
- Publish migrations and run
php artisan migrate
:php artisan vendor:publish --tag=migrations
- Add HasPhotos trait to your model:
use Msieprawski\EloquentPhotos\HasPhotos
- Add protected property to your model with directory name where photos should be stored:
protected $targetPhotosDirectory = 'users';
Usage
Add photos to your model
Add uploaded photos to your model
It will automatically upload the photos and store it against user entity.
Get photos
Delete photos
License
Licensed under the MIT License
All versions of eloquent-photos with dependencies
PHP Build Version
Package Version
No informations.
The package msieprawski/eloquent-photos contains the following files
Loading the files please wait ....