sergeymiracle/eloquent-uploadable
Larablocks Analysis
sergeymiracle/eloquent-uploadable works with Laravel 6, 7 and 8 (latest release 4.0.1, Feb 6, 2023), all past end of life (the last on Jan 24, 2023): no more fixes, even for security.
Laravel 5 in earlier releases.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 6, 7 and 8, past end of life since Jan 24, 2023
- No release in the last 12 months (last: Feb 6, 2023)
- 0 downloads a month (needs 10,000)
- 3 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Feb 6, 2023.
- No releases in the last 12 months.
- First released: Mar 3, 2017.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.
| Install | |
|---|---|
composer require sergeymiracle/eloquent-uploadable |
|
| Latest Version: | 4.0.1 |
| PHP: | >=7.2 |
| Laravel: | 6 · 7 · 8 |
| Older releases: | 5 |
| License: | MIT |
| Last Updated: | Feb 6, 2023 |
| Links: | GitHub · Packagist |
Eloquent Uploadable
A trait to automatically handle file uploads for Laravel Eloquent models.
Installation
composer require sergeymiracle/eloquent-uploadable
Example Usage
use SergeyMiracle\Uploadable\UploadableModelTrait;
use Illuminate\Database\Eloquent\Model;
class Post extends Model {
use UploadableModelTrait;
// define options function
public function getUploadableOptions(): array
{
return [
'attributes' => [ // model attributes which you'd like to be automatically handled by the trait.
'featured_image',
'featured_file'
],
'directory' => 'my_dir', // destination directory, optional
'disk' => 'my_disk' // flysystem disk, optional, if not present in return array disk from config file used
];
}
}
On saving array of files, a json encoded string saved in database.
Changelog
- 3.1.0 - added new config options for filename generation
- 3.0.0 - remove options - uploadables, use function getUploadableOptions() instead
- 2.0.0 - removed UtilsTrait.php and UploadableControllerTrait.php, UploadableFileHandler can be used instead, php 7.2
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 4.0.1 | >=7.2 | ^6.0| | MIT | |
| 4.0.0 | >=7.2 | ^6.0| | MIT | |
| 3.1.4 | >=7.2 | >=5.8 <7 | MIT | |
| 3.1.3 | >=7.2 | >=5.8 <6.0 | MIT | |
| 3.1.2 | >=7.2 | >=5.8 <6.0 | MIT | |
| 3.1.1 | >=7.2 | >=5.8 <6.0 | MIT | |
| 3.1.0 | >=7.2 | >=5.8 <6.0 | MIT | |
| 3.0.1 | >=7.2 | >=5.8 <6.0 | MIT | |
| 3.0.0 | >=7.2 | ~5.8.0 | MIT | |
| 2.1.0 | >=7.2 | ~5.8.0 | MIT | |
| 2.0.0 | >=7.2 | ~5.8.0 | MIT | |
| 1.1.9 | >=5.6.4 | 5.3.*| | MIT | |
| 1.1.8 | >=5.6.4 | 5.3.*| | MIT | |
| 1.1.7 | >=5.6.4 | 5.3.*| | MIT | |
| 1.1.6 | >=5.6.4 | 5.3.*| | MIT | |
| 1.1.5 | >=5.6.4 | 5.3.*| | MIT | |
| 1.1.4 | >=5.6.4 | 5.3.*| | MIT | |
| 1.1.3 | >=5.6.4 | 5.3.*| | MIT | |
| 1.1.2 | >=5.6.4 | 5.3.*| | MIT | |
| 1.1.1 | >=5.6.4 | 5.3.*| | MIT | |
| 1.1.0 | >=5.6.4 | 5.3.*| | MIT | |
| 1.0.1 | >=5.6.4 | 5.3.*| | MIT | |
| 1.0.0 | >=5.6.4 | 5.3.*| | MIT |