PHPackages                             it-devgroup/laravel-entity-file-table - 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. it-devgroup/laravel-entity-file-table

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

it-devgroup/laravel-entity-file-table
=====================================

laravel entity file table

2.1.0(2y ago)12.1k1MITPHPPHP ^8.0

Since Apr 23Pushed 2y ago2 watchersCompare

[ Source](https://github.com/it-devgroup/laravel-entity-file-table)[ Packagist](https://packagist.org/packages/it-devgroup/laravel-entity-file-table)[ RSS](/packages/it-devgroup-laravel-entity-file-table/feed)WikiDiscussions 1.x Synced 5d ago

READMEChangelog (5)Dependencies (6)Versions (7)Used By (1)

Install for Lumen
-----------------

[](#install-for-lumen)

**1.** Uncommented strings

```
$app->withFacades();
$app->withEloquent();

```

Added after **$app-&gt;configure('app');**

```
$app->configure('entity_file_table');

```

Open file `bootstrap/app.php` and add new service provider

```
$app->register(\ItDevgroup\LaravelEntityFileTable\Providers\EntityFileTableServiceProvider::class);

```

**2.** Run commands

For creating config file

```
php artisan entity:file:table:publish --tag=config

```

For creating migration file

```
php artisan entity:file:table:publish --tag=migration

```

For generate table

```
php artisan migrate

```

Install for laravel
-------------------

[](#install-for-laravel)

**1.** Open file **config/app.php** and search

```
    'providers' => [
        ...
    ]

```

Add to section

```
        \ItDevgroup\LaravelEntityFileTable\Providers\EntityFileTableServiceProvider::class,

```

Example

```
    'providers' => [
        ...
        \ItDevgroup\LaravelEntityFileTable\Providers\EntityFileTableServiceProvider::class,
    ]

```

**2.** Run commands

For creating config file

```
php artisan vendor:publish --provider="ItDevgroup\LaravelEntityFileTable\Providers\EntityFileTableServiceProvider" --tag=config

```

For creating migration file

```
php artisan entity:file:table:publish --tag=migration

```

For generate table

```
php artisan migrate

```

ENV variables
-------------

[](#env-variables)

File .env

Auto rename all upload files

```
ENTITY_FILE_TABLE_FILENAME_GENERATE=1

```

Root folder for all files

```
ENTITY_FILE_TABLE_DEFAULT_FOLDER=uploads

```

Custom model
------------

[](#custom-model)

###### Step 1

[](#step-1)

Create custom model for file

Example:

File: **app/CustomFile.php**

Content:

```
