PHPackages                             twom/laravel-file-manger - 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. twom/laravel-file-manger

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

twom/laravel-file-manger
========================

Upload file and download it :)

1.1.3(5y ago)3181PHPPHP &gt;=7

Since Mar 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Twom2020/laravel-file-manager)[ Packagist](https://packagist.org/packages/twom/laravel-file-manger)[ Docs](https://github.com/Twom2020/laravel-file-manager)[ RSS](/packages/twom-laravel-file-manger/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

Laravel File Manager
--------------------

[](#laravel-file-manager)

### Installation:

[](#installation)

```
composer require twom/laravel-file-manger

```

You must add the service provider to `config/app.php`

```
'providers' => [
	 // for laravel 5.8 and below
	 \Twom\FileManager\FileManagerServiceProvider::class,
];
```

**Publish your config file and migrations**

```
php artisan vendor:publish

```

---

### Config:

[](#config)

> config/filemanager.php

```
return [
  "type" => "default",

  "types" => [
	  "default" => [
		  "provider" => \Twom\FileManager\Types\File::class,
		  "path" => "default_files/test/",
		  "private" => false,
		  "date_time_prefix" => true,
		  "use_file_name_to_upload" => false,
		  "secret" => "ashkdsjka#sdkdjfsj22188455$$#$%dsDFsdf",
		  "download_link_expire" => 160, // minutes
	  ],
      "image"   => [
          "provider" => \Twom\FileManager\Types\Image::class,
          "path"     => "images/upload/documents/",
          "sizes"    => ["16", "24", "32", "64", "128", "320"],
          "thumb"    => "320"
      ],
      "profile" => [
          "parent"           => "image",
          "path"             => "images/upload/profiles/",
          "date_time_prefix" => false,
      ],
  ],
];
```

### Config Parameters

[](#config-parameters)

nametypedescriptionprovider`string (class name)`provider class name, must be extended of `Twom\FileManager\BaseType`path`string`file upload pathprivate`boolean`is private or no if is `true` so upload file in storage folder else if is `false` so upload file in public folderdate\_time\_prefix`boolean`if is `true` so upload file with `/{year}/{month}/{day}` prefixuse\_file\_name\_to\_upload`boolean`if is `true` we use of the file original name else we generate a random namesecret`string`secret key for generate download link and download filedownload\_link\_expire`boolean`generated download link expire timeparent`string`parent type namesizes`array`array of sizes and there are only for image typethumb`string` or `number`size for thumb image and this is only for image typeLets start to use:
------------------

[](#lets-start-to-use)

#### Upload a file:

[](#upload-a-file)

```
$file = request()->file('filename');
$upload = File::upload($file);

//	get file uploaded path
$filePath = $upload->getFilePath();

//	get file name
$fileName = $upload->getName();
```

#### You can use of this methods:

[](#you-can-use-of-this-methods)

methoddescription`useFileNameToUpload($status = true)`if is `true` we use of the file original name else we generate a random name`type($type = null)`change type for upload if is null so use of default type`getFile($name = null)`get file by name and return a `\Twom\FileManager\Models\File``setPath($path)`set file upload path`delete($filename)`delete the file help by this provider type`getUploadPath()`get upload path`dateTimePrefix($value = true)`if is `true` so upload file with `/{year}/{month}/{day}` prefix`setName(string $name)`set file name`setFormat(string $format)`set format for file upload`isPrivate()`if you call this so upload file in storage folder and your you don't have permission to access this file`isPublic()`if you call this so upload file in public folder and has access to this file### Examples:

[](#examples)

```
$file = request()->file('filename');
$upload = \Twom\FileManager\Facades\File::setName('your specific name')
	 ->isPrivate()
	 ->setFormat('png')
	 ->dateTimePrefix()
	 ->upload($file);
//	get file uploaded path => if is public you can use it for download
dd($upload->getFilePath());
```

```
$file = File::getFile("file uploaded name");
$file->name;
$file->path;
$file->type; // config file selected type
$file->isPrivate;
$file->isPublic;
$file->generateLink();

// return response download
// $file->download();
```

### Change type:

[](#change-type)

```
$file = request()->file('filename');
$upload = \Twom\FileManager\Facades\File::type("type_name") // type name in config file (filemanager.php)
    ->upload($file);
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~28 days

Recently: every ~35 days

Total

6

Last Release

2116d ago

Major Versions

0.1 → 1.0.02020-03-05

PHP version history (2 changes)0.1PHP ^7.2

1.1.1PHP &gt;=7

### Community

Maintainers

![](https://www.gravatar.com/avatar/d582fa00b58ea59b3302cdc8398dce78038edd6d11d38632394f7319796f9da8?d=identicon)[twom](/maintainers/twom)

---

Top Contributors

[![AliGhaleyan](https://avatars.githubusercontent.com/u/46399482?v=4)](https://github.com/AliGhaleyan "AliGhaleyan (4 commits)")[![Twom2020](https://avatars.githubusercontent.com/u/61540013?v=4)](https://github.com/Twom2020 "Twom2020 (2 commits)")

---

Tags

laravelfilefile managerlaravel file managerphp file manager

### Embed Badge

![Health badge](/badges/twom-laravel-file-manger/health.svg)

```
[![Health](https://phpackages.com/badges/twom-laravel-file-manger/health.svg)](https://phpackages.com/packages/twom-laravel-file-manger)
```

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[mafftor/laravel-file-manager

The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox

3619.3k](/packages/mafftor-laravel-file-manager)[reshadman/file-secretary

Get rid of anything related to files in Laravel, This package handles all for you. Anything we mean.

1131.8k](/packages/reshadman-file-secretary)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
