PHPackages                             munkh-altai/table-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. munkh-altai/table-manager

ActiveLibrary

munkh-altai/table-manager
=========================

table manager for laravel

1.0.4(8y ago)1221MITPHPPHP ^5.3.3 || ^7.0

Since Jun 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/munkh-altai/table-manager)[ Packagist](https://packagist.org/packages/munkh-altai/table-manager)[ RSS](/packages/munkh-altai-table-manager/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Laravel Table Manager
=====================

[](#laravel-table-manager)

#### Installation

[](#installation)

\[installation guide\] ()

#### Examples

[](#examples)

\[Sample example\] ([https://github.com/munkh-altai/table-manager#sample-example-Хэлний-хүснэгтийг-удирдах-жишээ](https://github.com/munkh-altai/table-manager#sample-example-%D0%A5%D1%8D%D0%BB%D0%BD%D0%B8%D0%B9-%D1%85%D2%AF%D1%81%D0%BD%D1%8D%D0%B3%D1%82%D0%B8%D0%B9%D0%B3-%D1%83%D0%B4%D0%B8%D1%80%D0%B4%D0%B0%D1%85-%D0%B6%D0%B8%D1%88%D1%8D%D1%8D)), \[Sample example with translation\] ([https://github.com/munkh-altai/table-manager#sample-example-with-transltation-Орчуулгийн-хүснэгтийг-удирдах-жишээ](https://github.com/munkh-altai/table-manager#sample-example-with-transltation-%D0%9E%D1%80%D1%87%D1%83%D1%83%D0%BB%D0%B3%D0%B8%D0%B9%D0%BD-%D1%85%D2%AF%D1%81%D0%BD%D1%8D%D0%B3%D1%82%D0%B8%D0%B9%D0%B3-%D1%83%D0%B4%D0%B8%D1%80%D0%B4%D0%B0%D1%85-%D0%B6%D0%B8%D1%88%D1%8D%D1%8D))

#### Main Features

[](#main-features)

- \[Configration\] ()
- \[Translation &amp; Static Words\] ()

#### Grid Features

[](#grid-features)

- Dynamic grid
- Fixed Rom &amp; Column in grid
- Auto calculation like excel
- Responsive
- Grid permission CRUD
- Grid column types image, link, internal link ...
- \[Change enum column's value in grid row\] ()
- Inline add &amp; edit
- translation
- \[CRUD permission\] ()
- Order
- Page name
- Created at
- Updated at
- where condition
- export CSV file (excel)
- reload module
- Change language
- visbile &amp; hide grid column's
- resize column &amp; row
- Sort
- Search
- Filter column
- Inline form validation
- Pagination
- Change per page items
- Count total items
- Count total pages
- \[Before delete\] ()

#### Form Features

[](#form-features)

- Dynamic form
- \[Show and Hide by other element's value\] ()
- \[Before insert\] ()
- \[Support multi element types\] ()
- Translation
- validation (required, max, min, number, email, unique, password confirm)
- After save message
- Custom After save message
- group element
- Disable element from grid permission
- Sub items support
- Multi insert once time
- Focus index
- if update disabled can edit columns by other element value
- password change mode

#### Installation guide

[](#installation-guide)

1. install

```
composer require munkh-altai/table-manager
```

2. In the $providers array add the service providers for this package in config/app.php.

```
TableManager\TableManagerServiceProvider::class,
```

3. Add the facade of this package to the $aliases array in config/app.php.

```
'TableManager' => TableManager\Facade\TableManager::class,
```

4. composer du
5. publish config

```
php artisan vendor:publish --tag=tm-config

```

6. set your route

```
    Route::get('/{slug}/', 'AdminController@TableManager');
    Route::post('/{slug}/{action}', 'AdminController@TableManager');
```

7. add module name in use section your controller

```
use TableManager\TableManager;
```

8. create your view with css and javascript of table properties

css

```
@if(Config::get('table-manager.debug'))

    @else

    @endif
```

app div

```

   window.setup = {!! json_encode($setup) !!};

@if($setup['googleMap'] == true)

@endif
```

javascript

```

    @if(Config::get('tp_config.tp_debug'))

    @else

    @endif
```

9. Last add once funtion to your controller

```
 public function TableProperties($slug, $action = 'index') {

        if (!method_exists($this, $slug))
        abort(503);
         else
            return $this->$slug($action);

    }
```

10. Crate CRUD funciton

```
public function users($action)
    {

        $tm = new TableManager();

        $tm->viewName = 'table-manager';
        $tm->table = 'users';
        $tm->page_name = 'Хэрэглэгч';
        $tm->identity_name = 'id';
        $tm->grid_columns = [
            'users.name',
            'users.email',
            'users.id'];
        $tm->grid_default_order_by = 'users.id DESC';
        $tm->formType = 'page';
        $tm->created_at = 'created_at';
        $tm->updated_at = 'updated_at';
        $tm->where_condition = [];

        $tm->grid_output_control = [

            ['column' => 'name', 'title' => 'Нэр', 'type' => '--text', 'fixed' => false],
            ['column' => 'email', 'title' => 'И-мэйл', 'type' => '--text', 'fixed' => false],

        ];

        $tm->form_input_control = [

            ['column' => 'name', 'title' => 'Нэр', 'type' => '--text', 'value' => null, 'validate' => 'required'],

            ['column' => 'email', 'title' => 'И-мэйл', 'type' => '--text', 'value' => null, 'validate' => 'required|email|unique:users,email,NULL,' . $tm->identity_name],
        ];

        return $tm->run($action);

    }
```

#### Configration

[](#configration)

Module-г publish хийсэний дараа laravel framework-н "config" folder дотор "tp\_config.php" гэсэн тохиргооны file хуулагдана.

Configration list, Тохиргооны жагсаалт

- form &amp; grid buttons's text
- debug mode controll
- default locale
- locale's table
- static word's table

#### Translation &amp; Static Words

[](#translation--static-words)

Орчуулгийн боломжийг grid болон form дээр ашиглахын тулд хэлний хүснэгт өгөгдлийн сант үүссэн байх шаардлагатай

solar\_locales table's columns (id, code, language, flag)

Мөн хэрэглэгч талд зориулан i18 стандартын JSON болон laravel-д зориулсан орчуулгийн file үүсгэх боломж байгаа. solar\_static\_words table's columns (id, key, translation)

\[Орчуулгийн хүснэгтийг удирдах жишээ\] ([https://github.com/munkh-altai/table-manager#sample-example-with-transltation-Орчуулгийн-хүснэгтийг-удирдах-жишээ](https://github.com/munkh-altai/table-manager#sample-example-with-transltation-%D0%9E%D1%80%D1%87%D1%83%D1%83%D0%BB%D0%B3%D0%B8%D0%B9%D0%BD-%D1%85%D2%AF%D1%81%D0%BD%D1%8D%D0%B3%D1%82%D0%B8%D0%B9%D0%B3-%D1%83%D0%B4%D0%B8%D1%80%D0%B4%D0%B0%D1%85-%D0%B6%D0%B8%D1%88%D1%8D%D1%8D))

Grid Features
=============

[](#grid-features-1)

#### Change enum column's value in grid row

[](#change-enum-columns-value-in-grid-row)

Grid дээр харуулах мөр доторх баганыг утгаас нь хамаарч өөр текст харуулах бол хэргэлнэ. Жишээ:

```
$tp->form_input_control = [
['column'=>'is_buleg', 'title'=>'Бүлэг эсэх', 'type'=>'--text', 'change_value'=>[
                ['value'=>0, 'text'=>'Үгүй'],
                ['value'=>1, 'text'=>'Тийм'],
            ]
    ],
];
```

#### CRUD permission

[](#crud-permission)

module-д эрх зааж өгж болно. Default

```
$tp->permission = ['c'=>true, 'r'=>true, 'u'=>true, 'd'=>true];
```

#### Before delete

[](#before-delete)

grid-н мөр устгахаас өмнө ажиллах үйлдэл. Жишээ:

```
 $tp->before_delete = [
            'controller'=>'App\Http\Controllers\AdminController',
            'function'=>'beforeDeleteAanSalbar'
        ];

 //exmample before delete function
   public function beforeDeleteAanSalbar($id){
        $userid = DB::table('aan')->select('user_id')->where('ID', '=', $id)->pluck('user_id');

        DB::table('users')->where('id', '=', $userid)->delete();

    }
```

Form Features
=============

[](#form-features-1)

#### Show and Hide by other element's value

[](#show-and-hide-by-other-elements-value)

Өөр элелентийн утгаас хамаарч харуулах, нуух. Энэ боломж нь аль нэг элементийн утгаас хамаарч тухайн элеметийг харуулах, нуух үйлдэл хийнэ. Form-н column нь дотроо хийж өгөнө 'show'=&gt;\[\['is\_baiguullaga'=&gt;0\]\] хийж өгөхдөө ямар элеметийн утга ямар байхад харуулах аа бичиж өгнө. Жишээ:

```
$tp->form_input_control = [
 ['column'=>'is_baiguullaga', 'title'=>'Ажил олгогчийн төрөл', 'type'=>'--radio', 'value'=>0, 'choices'=>[
                ['value'=>0, 'text'=>'Аж ахуйн нэгж, байгууллага'],
                ['value'=>1, 'text'=>'Иргэн'],
 ], 'validate'=>'required'],
 ['column'=>'omch_huvi', 'title'=>'Өмчийн хувь', 'type'=>'--number', 'value'=>null, 'validate'=>'required' , 'show'=>[['is_baiguullaga'=>0]]],
];
```

#### Before insert

[](#before-insert)

Form-н мэдээллийг хадгалахаас өмнө мэдээллийг өөрчлөх эсвэл мэдээлэл нэмэх боломжтой, ямар нэгэн Conroller-н Function зааж өгнө. Жишээ:

```
$tp->before_insert = [
            'controller'=>'App\Http\Controllers\AdminController',
            'function'=>'beforeInsertUser',
            'arguments'=>[]
 ];

 //exmample before insert function
    public function beforeInsertUser($data){
         $insert_values = $data['insert_values'];

         $user = [];

         $pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 8);

         $toMail = $insert_values['email'];

         Mail::send('mail.register', ['password'=>$pass, 'email'=>$toMail], function($message) use ($toMail) {
             $message->to($toMail);
             $message->subject('Нэвтрэх нууц үг');
         });

         return ['password'=>bcrypt($pass)];
     }
```

#### Support multi element types

[](#support-multi-element-types)

- --text
- --number
- --money
- --email
- --link
- --textarea
- --disabled
- --ckeditor
- --drag-map (select location on google map by drag arrow)
- --single-file
- --multi-file
- --date
- --datetime
- --time
- --combogrid
- --combobox
- --combobox-addable
- --tag
- --checkbox
- --radio
- --password
- --password-confirm
- --auto-calculate (sum, multfly, minus)

#### Sample example, Хэлний хүснэгтийг удирдах жишээ

[](#sample-example-хэлний-хүснэгтийг-удирдах-жишээ)

```
    public function locales ($action){

        $tp = new Tp();
        $tp->viewName = 'admin._pages.options';
        $tp->table = 'solar_locales';
        $tp->page_name = 'Хэл';
        $tp->identity_name = 'id';
        $tp->grid_default_order_by = 'id DESC';
        $tp->grid_columns = ['code', 'language', 'flag', 'id'];

        $tp->grid_output_control = [
            ['column'=>'code', 'title'=>'Улсын код', 'type'=>'--text'],
            ['column'=>'language', 'title'=>'Хэл', 'type'=>'--text'],
            ['column'=>'flag', 'title'=>'Туг', 'type'=>'--text'],
        ];
        $tp->form_input_control = [

            ['column'=>'code', 'title'=>'Улсын код', 'type'=>'--text', 'value'=>null, 'validate'=>'required'],
            ['column'=>'language', 'title'=>'Хэл', 'type'=>'--text', 'value'=>null, 'validate'=>'required'],
            ['column'=>'flag', 'title'=>'Туг', 'type'=>'--text', 'value'=>null, 'validate'=>'required'],

        ];
        $tp->formType = 'page';
        return $tp->run($action);

    }
```

#### Sample example with transltation, Орчуулгийн хүснэгтийг удирдах жишээ

[](#sample-example-with-transltation-орчуулгийн-хүснэгтийг-удирдах-жишээ)

```
   function staticWords($action){
        $tp = new Tp();
        $tp->viewName = 'admin._pages.options';;
        $tp->table = 'solar_static_words';
        $tp->page_name = 'Статик үгсийн сан';
        $tp->identity_name = 'id';
        $tp->grid_default_order_by = 'id DESC';
        $tp->grid_columns = ['key', 'translation', 'id'];
        $tp->generateLocaleFile = true;

        $tp->grid_output_control = [
            ['column' => 'key', 'title' => 'Түлхүүр үг', 'type' => '--text'],
            ['column' => 'translation', 'title' => 'Орчуулга', 'type' => '--text', 'translate' =>true],
        ];
        $tp->form_input_control = [
            ['column' => 'key', 'title' => 'Түлхүүр үг', 'type' => '--text', 'value' => null, 'validate' => 'required'],
        ];

        $tp->translate_form_input_control = [
            ['column' => 'translation', 'title' => 'Орчуулга', 'type' => '--text', 'value' => null, 'validate' => 'required'],
        ];

        $tp->formType = 'page';
        return $tp->run($action);

    }
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity61

Established project with proven stability

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 ~0 days

Total

4

Last Release

3259d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3198446?v=4)[Munkh-Altai](/maintainers/munkh-altai)[@munkh-altai](https://github.com/munkh-altai)

### Embed Badge

![Health badge](/badges/munkh-altai-table-manager/health.svg)

```
[![Health](https://phpackages.com/badges/munkh-altai-table-manager/health.svg)](https://phpackages.com/packages/munkh-altai-table-manager)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.4M31](/packages/laravolt-avatar)[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)[aimeos/aimeos-core

Full-featured e-commerce components for high performance online shops

4.5k346.9k48](/packages/aimeos-aimeos-core)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)

PHPackages © 2026

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