PHPackages                             chicky/laravel-modules - 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. [Framework](/categories/framework)
4. /
5. chicky/laravel-modules

ActiveLibrary[Framework](/categories/framework)

chicky/laravel-modules
======================

Gamota Laravel Module management (For Landing)

v9.0.7(3y ago)015MITPHPPHP &gt;=8.0

Since Jun 29Pushed 3y agoCompare

[ Source](https://github.com/doanquydau/laravel-modules)[ Packagist](https://packagist.org/packages/chicky/laravel-modules)[ GitHub Sponsors](https://github.com/nwidart)[ RSS](/packages/chicky-laravel-modules/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (7)Versions (85)Used By (0)

Laravel-Modules
===============

[](#laravel-modules)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9d3097f3a98d82e54ecc9263a17e975aaac3ec94bfc09c7b252341abdfc0a58a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e7769646172742f6c61726176656c2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nwidart/laravel-modules)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/00f1b2365fd38bfa8b9ea9d2216c51f9002e56741a53e136b9e1f766f2447d35/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6e5769646172742f6c61726176656c2d6d6f64756c65732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/nWidart/laravel-modules)[![Scrutinizer Coverage](https://camo.githubusercontent.com/52e78f479efe5bc2827ac89f529a02cd78537180892c59da2866b50a91dc7825/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6e5769646172742f6c61726176656c2d6d6f64756c65732e7376673f6d61784167653d3836343030267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/nWidart/laravel-modules/?branch=master)[![Quality Score](https://camo.githubusercontent.com/52be046b8acd6562334cb1dff0a8c474faa25d406ecf0520106aac54382ea2fe/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6e5769646172742f6c61726176656c2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/nWidart/laravel-modules)[![Total Downloads](https://camo.githubusercontent.com/e52342f289b5b2c9b918e0d9466b7d5155003e14b50719b138cee578fc7395fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e7769646172742f6c61726176656c2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nwidart/laravel-modules)

**Laravel****laravel-modules**9.0^9.0`chicky/laravel-modules` is a Laravel package which created to manage your large Laravel app using modules, mostly just use to support Gamota Landing System. Module is like a Laravel package, it has some views, controllers or models. This package is supported and tested in Laravel 9.

Install
-------

[](#install)

To install through Composer, by run the following command:

```
composer require chicky/laravel-modules
```

The package will automatically register a service provider and alias.

Optionally, publish the package's configuration file by running:

```
php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider"
```

### Autoloading

[](#autoloading)

By default, the module classes are not loaded automatically. You can autoload your modules using `psr-4`. For example:

```
{
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Modules\\": "Modules/",
      "Database\\Factories\\": "database/factories/",
      "Database\\Seeders\\": "database/seeders/"
  }

}
```

**Tip: don't forget to run `composer dump-autoload` afterwards.**

Documentation
-------------

[](#documentation)

Basic documentation on .

Gamota Components Document
--------------------------

[](#gamota-components-document)

#### Requirements

[](#requirements)

- Add variables in env file (support for Landing API): ```
      PURCHASE_LIST_GAME_SECRET_KEY=
      PURCHASE_SECRET_KEY=
      PURCHASE_GET_ROLE_SECRET_KEY=
      PAY_AUTH_SECRET_KEY=
      GAME_API_KEY=
      APPOTA_API_KEY=
      TELEGRAM_API_KEY=
      SENDGIFT_VERIFY_TOKEN=

    ```
- Install `Passport````
      php artisan migrate
      php artisan passport:install

    ```

#### 1. Create Module

[](#1-create-module)

- Have 2 ways to create a module:

##### Way 1:

[](#way-1)

Create module with default

- Step 1: `php artisan module:make  --support="gamota"`
- Step 2: `php artisan make:gamota-component birthday --components="item,item_log"`.

> Components: item, item\_log, role, payment, config.

##### Way 2 (recommend):

[](#way-2-recommend)

Create module with components

- Step 1: `php artisan module:make  --components="item,item_log,config,share,payment,role" --support="gamota"`

> Components: item, item\_log, role, payment, config.

Parameter `--support="gamota"` to generate module controller support Gamota Landing APIs

##### Run Migrate

[](#run-migrate)

- Don't forget `php artisan module:migrate `

#### 2. Add Module to Sidebar in CMS

[](#2-add-module-to-sidebar-in-cms)

Insert this code `@include('trianvip::partials.sidebar.trianvip')` in file: `resources/views/partials/sidebar.blade.php`

#### 3. Create Send Gift Console

[](#3-create-send-gift-console)

- Run `php artisan module:make-sendgift-command `.
- Add below code to Module Service Provider ```
    $this->commands([
        SendGiftCommand::class,
    ]);

    ```
- Run command `php artisan module_name:send-gift`. Example: `php artisan birthday:send-gift`

> List Laravel command: `php artisan list`

#### 4. Landing API docs

[](#4-landing-api-docs)

- Base URL:
- Dev Base URL:

[Login](#login)

- [Login Normal](#login-normal)
- [Login Google](#login-google)
- [Login Facebook](#login-facebook)

[Server &amp; Role](#server-and-role)

- [List Server](#list-server)
- [List Role](#list-role)

[Attend](#attend)

- [Attend](#attend)

[Role Info](#role-info)

- [Get Role Info](#get-role-info)

[Spin](#spin)

- [Spin](#spin)

[Rule](#rule)

- [Get Rule](#get-rule)

[History](#history)

- [List Histories](#list-histories)

[Rank](#rank)

- [List Rank](#list-rank)

Share

- [Post Share](#post-share)
- [Get total share](#get-total-share)

### Login

[](#login)

#### Login Normal

[](#login-normal)

1. URL: `api//login`
2. Method: `POST`
3. Params:

- `username`: String
- `password`: String

5. response: JSON

    ```
    {
        "error": int,
        "message": "string",
        "data": {
            "appota_userid": 2618078,
            "appota_username": "Xuanxuxu",
             "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjE4MDc4IiwiaWF0IjoxNjU1Nzk0Mzk0LCJhcHBvdGFfdXNlcmlkIjoiMjYxODA3OCIsImFwcG90YV91c2VybmFtZSI6Ilh1YW54dXh1IiwiZXhwIjoxNjU1ODA1MTk0fQ.NlgsXksofRR_tGfodO-CRWkv_tJXsXvYDRuPyNu08Dc",
            "expired": 1655805194
        }
    }
    ```

#### Login Google

[](#login-google)

1. URL: `api//login`
2. Method: `POST`
3. Params:

- `google_token`: String

5. response: JSON

    ```
    {
        "error": int,
        "message": "string",
        "data": {
            "appota_userid": 2618078,
            "appota_username": "Xuanxuxu",
             "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjE4MDc4IiwiaWF0IjoxNjU1Nzk0Mzk0LCJhcHBvdGFfdXNlcmlkIjoiMjYxODA3OCIsImFwcG90YV91c2VybmFtZSI6Ilh1YW54dXh1IiwiZXhwIjoxNjU1ODA1MTk0fQ.NlgsXksofRR_tGfodO-CRWkv_tJXsXvYDRuPyNu08Dc",
            "expired": 1655805194
        }
    }
    ```

#### Login Facebook

[](#login-facebook)

1. URL: `api//login`
2. Method: `POST`
3. Params:

- `facebook_token`: String

5. response: JSON

    ```
    {
        "error": int,
        "message": "string",
        "data": {
            "appota_userid": 2618078,
            "appota_username": "Xuanxuxu",
             "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjE4MDc4IiwiaWF0IjoxNjU1Nzk0Mzk0LCJhcHBvdGFfdXNlcmlkIjoiMjYxODA3OCIsImFwcG90YV91c2VybmFtZSI6Ilh1YW54dXh1IiwiZXhwIjoxNjU1ODA1MTk0fQ.NlgsXksofRR_tGfodO-CRWkv_tJXsXvYDRuPyNu08Dc",
            "expired": 1655805194
        }
    }
    ```

### Server and Role

[](#server-and-role)

#### List Server

[](#list-server)

1. URL: `api//list-server`
2. Authorization: null
3. Method: `GET`
4. Params:

- `username`: String
- `password`: String

5. response: JSON

    ```
    {
        "error": 0,
        "message": "",
        "data": {
            "23001": "Bích Dao",
            "23092": "Cửu Ngạn",
            "23102": "Đại Bằng",
        }
    }
    ```

#### List Role

[](#list-role)

1. URL: `api//list-role`
2. Headers: `Authorization: Bearer `
3. Method: `GET`
4. Params:

- `server_id`: Int

5. response: JSON

    ```
    {
        "error": int,
        "message": "string"
        "data": {
            "6474205939321801742": "Rufuif",
            "6484620513460142559": "Xxtyu",
            "6486872313273780784": "xuanxuxu",
            "6490531487971060786": "heoheo",
            "6491375912901154073": "chipchip"
        }
    }
    ```

### Attend

[](#attend)

#### Attend

[](#attend-1)

1. URL: `api//attend`
2. Headers: `Authorization: Bearer `
3. Method: `POST`
4. Params:

- `role_id`: String
- `role_name`: String
- `server_id`: String
- `server_name`: String

5. response: JSON

    ```
    {
        "error": 0,
        "message": "",
    }
    ```

### Role Info

[](#role-info)

#### Get Role Info

[](#get-role-info)

1. URL: `api//get-role-info`
2. Headers: `Authorization: Bearer `
3. Method: `GET`
4. Params:

- `role_id`: String

5. response: JSON

    ```
    {
        "error": 0,
        "message": "",
        "data": {
            "spin_total": 100,
            "spin_received": 20,
            "spin_available": 80,
            "detail": [
                "role_id": "6490250012994306385",
                "role_name": "BăngČTuyết",
                "server_name": "Đằng Vân",
                "spin_total": "100"
            ]
        }
    }
    ```

### Spin

[](#spin)

#### Spin

[](#spin-1)

1. URL: `api//spin`
2. Headers: `Authorization: Bearer `
3. Method: `POST`
4. Params:

- `role_id`: String
- `server_id`: String
- `type`: Integer | Enum (1, 3, 6)

5. response: JSON

    ```
    {
        "error": 0,
        "message": "",
        "data": {
            "spin_total": 100,
            "spin_received": 20,
            "spin_available": 80,
            "detail": [
                {
                    "gift_title": "Quà ingame ",
                    "gift_id": 1,
                    "position": 1
                },
                {
                    "gift_title": "Quà ingame ",
                    "gift_id": 1,
                    "position": 1
                },
                {
                    "gift_title": "Áo Tru Tiên",
                    "gift_id": 2,
                    "position": 2
                }
            ]
        }
    }
    ```

### Rule

[](#rule)

#### Get Rule

[](#get-rule)

1. URL: `api//rule`
2. Authorization: None
3. Method: `GET`
4. Params:
5. response: JSON

    ```
    {
        "error": 0,
        "message": "",
        "data": "Rule Text"
    }
    ```

### History

[](#history)

#### List History

[](#list-history)

1. URL: `api//histories`
2. Headers: `Authorization: Bearer `
3. Method: `GET`
4. Params:

- `role_id`: String
- `type`: String - Type: spin

5. response: JSON

    ```
    {
        "error": 0,
        "message": "",
        "data": [
            {
                "gift_id": 1,
                "gift_type": "spin",
                "gift_title": "Quà ingame",
                "role_name": "BăngČTuyết",
                "server_name": "Đằng Vân",
                "created_at": "2022-06-20 17:56:30",
                "detail": {
                    "title": "Quà ingame",
                    "image": "https://trutien.gamota.com/wp-content/uploads/2021/03/giang-tu-tinh-hon.png\r\n"
                }
            },
            ...
        ]
    }
    ```

### Rank

[](#rank)

#### List Rank

[](#list-rank)

1. URL: `api//api/ranks`
2. Authorization: None
3. Method: `GET`
4. Params:
5. response: JSON

    ```
    {
        "error": 0,
        "message": "",
        "data": [
            {
                "role_name": "BăngČTuyết",
                "server_name": "Đằng Vân",
                "counted_rows": 14,
                "appota_userid": 2618078,
                "appota_username": "caongocthu1995"
            },
            ...
        ]
    }
    ```

### Share

[](#share)

#### Post Share

[](#post-share)

1. URL: `api//share`
2. Headers: `Authorization: Bearer `
3. Method: `POST`
4. Params:

    - role\_id: integer | required
5. response: JSON

    ```
    {
        "error": integer,
        "message": string
    }
    ```

#### Get Total Share

[](#get-total-share)

1. URL: `api//total-share`
2. Authorization: None
3. Method: `GET`
4. Params:
5. response: JSON

    ```
    {
        "error": integer,
        "message": string,
        "data": 1
    }
    ```

### For Developer

[](#for-developer)

- Run `docker-compose up`
- Run `docker exec -it api-gamota-landing_php-fpm_1 bash` to access to server.
- Run `chown -R 1000:1000 Modules/` to set permission for Module folder.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 75.6% 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 ~27 days

Recently: every ~0 days

Total

82

Last Release

1458d ago

Major Versions

4.1.0 → 5.0.02019-03-18

5.1.0 → 6.0.02019-09-19

6.0.x-dev → 7.0.02020-03-26

7.3.0 → 8.0.02020-10-03

v8.3.0 → v9.0.02022-02-10

PHP version history (8 changes)0.1PHP &gt;=5.5

2.0.0PHP &gt;=7.0

3.0.0PHP &gt;=7.1

5.0.0PHP &gt;=7.2

7.0.0PHP ^7.2.5

7.2.0PHP &gt;=7.2.5

8.0.0PHP &gt;=7.3

v9.0.0PHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![nWidart](https://avatars.githubusercontent.com/u/882397?v=4)](https://github.com/nWidart "nWidart (692 commits)")[![Kyslik](https://avatars.githubusercontent.com/u/2067589?v=4)](https://github.com/Kyslik "Kyslik (34 commits)")[![lindo-llc](https://avatars.githubusercontent.com/u/11467641?v=4)](https://github.com/lindo-llc "lindo-llc (17 commits)")[![dcblogdev](https://avatars.githubusercontent.com/u/1018170?v=4)](https://github.com/dcblogdev "dcblogdev (16 commits)")[![ahmedggalal](https://avatars.githubusercontent.com/u/38420331?v=4)](https://github.com/ahmedggalal "ahmedggalal (16 commits)")[![rcbgalido](https://avatars.githubusercontent.com/u/10085573?v=4)](https://github.com/rcbgalido "rcbgalido (13 commits)")[![4m1n0s](https://avatars.githubusercontent.com/u/2763884?v=4)](https://github.com/4m1n0s "4m1n0s (11 commits)")[![mikemand](https://avatars.githubusercontent.com/u/745184?v=4)](https://github.com/mikemand "mikemand (11 commits)")[![Schweppesale](https://avatars.githubusercontent.com/u/175759?v=4)](https://github.com/Schweppesale "Schweppesale (10 commits)")[![doanquydau](https://avatars.githubusercontent.com/u/43127405?v=4)](https://github.com/doanquydau "doanquydau (10 commits)")[![pickmanmurimi](https://avatars.githubusercontent.com/u/15788867?v=4)](https://github.com/pickmanmurimi "pickmanmurimi (9 commits)")[![KABBOUCHI](https://avatars.githubusercontent.com/u/9212274?v=4)](https://github.com/KABBOUCHI "KABBOUCHI (8 commits)")[![jnbn](https://avatars.githubusercontent.com/u/112425?v=4)](https://github.com/jnbn "jnbn (6 commits)")[![rjvandoesburg](https://avatars.githubusercontent.com/u/1488300?v=4)](https://github.com/rjvandoesburg "rjvandoesburg (5 commits)")[![FaZeRs](https://avatars.githubusercontent.com/u/9529341?v=4)](https://github.com/FaZeRs "FaZeRs (4 commits)")[![nmfzone](https://avatars.githubusercontent.com/u/10361906?v=4)](https://github.com/nmfzone "nmfzone (4 commits)")[![balping](https://avatars.githubusercontent.com/u/5840038?v=4)](https://github.com/balping "balping (4 commits)")[![ReinierH](https://avatars.githubusercontent.com/u/8132589?v=4)](https://github.com/ReinierH "ReinierH (4 commits)")[![Rezrazi](https://avatars.githubusercontent.com/u/2086576?v=4)](https://github.com/Rezrazi "Rezrazi (4 commits)")[![RSpeekenbrink](https://avatars.githubusercontent.com/u/7093216?v=4)](https://github.com/RSpeekenbrink "RSpeekenbrink (4 commits)")

---

Tags

laravelmodulemodulesradnwidart

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/chicky-laravel-modules/health.svg)

```
[![Health](https://phpackages.com/badges/chicky-laravel-modules/health.svg)](https://phpackages.com/packages/chicky-laravel-modules)
```

###  Alternatives

[nwidart/laravel-modules

Laravel Module management

6.2k16.1M325](/packages/nwidart-laravel-modules)[mhmiton/laravel-modules-livewire

Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.

236476.9k9](/packages/mhmiton-laravel-modules-livewire)[pingpong/modules

Laravel Modules

590190.8k13](/packages/pingpong-modules)

PHPackages © 2026

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