PHPackages                             fboseca/files\_manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. fboseca/files\_manager

ActivePackage[File &amp; Storage](/categories/file-storage)

fboseca/files\_manager
======================

Associate Laravel`s models with files uploaded

v2.1.1(4y ago)07[1 PRs](https://github.com/fboseca/FilesManager/pulls)mitPHPPHP &gt;=7.1.3

Since Jun 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/fboseca/FilesManager)[ Packagist](https://packagist.org/packages/fboseca/files_manager)[ RSS](/packages/fboseca-files-manager/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

[![Packagist Version](https://camo.githubusercontent.com/22a9c2e324d1a4a13170c27853e2424f57718f776a192c0753feaeb3c4020254/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66626f736563612f66696c65735f6d616e61676572)](https://packagist.org/packages/fboseca/files_manager) [![Packagist License](https://camo.githubusercontent.com/acb26c50aae3619b8732e7c6e44649678c65ae73bc0a16f8039891cbb5652f13/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f66626f736563612f66696c65735f6d616e61676572)](https://camo.githubusercontent.com/acb26c50aae3619b8732e7c6e44649678c65ae73bc0a16f8039891cbb5652f13/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f66626f736563612f66696c65735f6d616e61676572) [![Laravel](https://camo.githubusercontent.com/97a47ef657f5ae66a0f8731690ba17a8ba180aca164caa965ae8a97c21728b86/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d2533453d362d6f72616e67652e737667)](https://laravel.com/docs/6.x) [![Php](https://camo.githubusercontent.com/41b4b04766743be5aa6a531535ad7b5be34f478f43baf16accc063e00f6f92e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e312e332d6f72616e67652e737667)](https://camo.githubusercontent.com/41b4b04766743be5aa6a531535ad7b5be34f478f43baf16accc063e00f6f92e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e312e332d6f72616e67652e737667)

What It Does
============

[](#what-it-does)

This package allows you to keep track of the uploaded files, for this it associates each file to a Laravel model, getting a quick and easy manage.

Once installed you can do stuff like this:

```
$user = User::find(1);

//attach a file with a User model
//thats will be save the file on bbdd and the storage app/public/files by default
$user->addFile($request->file('file'));

//for download all images into a zip file
$user1->images->toZipFile()->download('allMyImages');

//for delete all images with date less now
$user1->images()->where('created_at', '
