Download the PHP package chicky/laravel-modules without Composer
On this page you can find all versions of the php package chicky/laravel-modules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-modules
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
To install through Composer, by run the following command:
The package will automatically register a service provider and alias.
Optionally, publish the package's configuration file by running:
Autoloading
By default, the module classes are not loaded automatically. You can autoload your modules using psr-4
. For example:
Tip: don't forget to run composer dump-autoload
afterwards.
Documentation
Basic documentation on https://docs.laravelmodules.com/.
Gamota Components Document
Requirements
-
Add variables in env file (support for Landing API):
- Install
Passport
1. Create Module
- Have 2 ways to create a module:
Way 1:
Create module with default
- Step 1:
- Step 2: .
Components: item, item_log, role, payment, config.
Way 2 (recommend):
Create module with components
- Step 1:
Components: item, item_log, role, payment, config.
Parameter --support="gamota"
to generate module controller support Gamota Landing APIs
Run Migrate
- Don't forget
php artisan module:migrate <Module Name>
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
- Run
php artisan module:make-sendgift-command <Module Name>
. -
Add below code to Module Service Provider
- Run command
php artisan module_name:send-gift
. Example:php artisan birthday:send-gift
List Laravel command:
php artisan list
4. Landing API docs
- Base URL: https://trutien.gamota.net
- Dev Base URL: https://dev-trutien.gamota.net
Login
- Login Normal
- Login Google
- Login Facebook
Server & Role
- List Server
- List Role
Attend
- Attend
Role Info
- Get Role Info
Spin
- Spin
Rule
- Get Rule
History
- List Histories
Rank
- List Rank
[Share]()
- Post Share
- Get total share
Login
Login Normal
- URL:
api/<module_name>/login
- Method:
POST
- Params:
username
: Stringpassword
: String
- response: JSON
Login Google
- URL:
api/<module_name>/login
- Method:
POST
- Params:
google_token
: String
- response: JSON
Login Facebook
- URL:
api/<module_name>/login
- Method:
POST
- Params:
facebook_token
: String
- response: JSON
Server and Role
List Server
- URL:
api/<module_name>/list-server
- Authorization: null
- Method:
GET
- Params:
username
: Stringpassword
: String
- response: JSON
List Role
- URL:
api/<module_name>/list-role
- Headers:
Authorization: Bearer <access_token>
- Method:
GET
- Params:
server_id
: Int
- response: JSON
Attend
Attend
- URL:
api/<module_name>/attend
- Headers:
Authorization: Bearer <access_token>
- Method:
POST
- Params:
role_id
: Stringrole_name
: Stringserver_id
: Stringserver_name
: String
- response: JSON
Role Info
Get Role Info
- URL:
api/<module_name>/get-role-info
- Headers:
Authorization: Bearer <access_token>
- Method:
GET
- Params:
role_id
: String
- response: JSON
Spin
Spin
- URL:
api/<module_name>/spin
- Headers:
Authorization: Bearer <access_token>
- Method:
POST
- Params:
role_id
: Stringserver_id
: Stringtype
: Integer | Enum (1, 3, 6)
- response: JSON
Rule
Get Rule
- URL:
api/<module_name>/rule
- Authorization: None
- Method:
GET
- Params:
- response: JSON
History
List History
- URL:
api/<module_name>/histories
- Headers:
Authorization: Bearer <access_token>
- Method:
GET
- Params:
role_id
: Stringtype
: String - Type: spin
- response: JSON
Rank
List Rank
- URL:
api/<module_name>/api/ranks
- Authorization: None
- Method:
GET
- Params:
- response: JSON
Share
Post Share
- URL:
api/<module_name>/share
- Headers:
Authorization: Bearer <access_token>
- Method:
POST
- Params:
- role_id: integer | required
- response: JSON
Get Total Share
- URL:
api/<module_name>/total-share
- Authorization: None
- Method:
GET
- Params:
- response: JSON
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.
All versions of laravel-modules with dependencies
ext-json Version *