globalxtreme/laravel-backend-service
最新稳定版本:v2.1.5
Composer 安装命令:
composer create-project globalxtreme/laravel-backend-service
包简介
GlobalXtreme Default Backend Service V2.
关键字:
README 文档
README
Installation
composer create-project globalxtreme/laravel-backend-service project
Configuration system in config/base.conf.php
return [ 'prefix' => [ // Base uri for website application 'web' => env('BASE_WEB_PREFIX', 'web'), // Base uri for mobile application 'mobile' => env('BASE_MOBILE_PREFIX', 'mobile'), ], 'namespace' => [ // Base namespace for website application 'web' => env('BASE_WEB_NAMESPACE', 'Web'), // Base namespace for mobile application 'mobile' => env('BASE_MOBILE_NAMESPACE', 'Mobile'), ] ];
Authorization
Install laravel-identifier. If you don't have access to this package, please contact your head for invite you to this package
Generate trait for activity properties file in model
php artisan make:activity path\ModelClass
After success generate activity file, you can check in model directory. Ex: generate activity class for App\Models\Component\Example::class. You can run command like this "php artisan make:activity Component\Component" will generate activity trait file App\Models\Component\Traits\HasActivityComponentProperty::class.
Generate number generator class
php artisan make:number ClassName
After success generate number generator, you can check in app\Services\Number\Generator path. You can modify the number generator if you have a custom format.
class TestingNumber extends BaseNumber { /** * @var string */ protected static string $prefix = "TXT"; // Your prefix number (code) /** * @var Model|string|null */ protected Model|string|null $model = null; // Add this function if you have a custom format. public static function generate(): string { // Your custom format } }
Generate form class (builder)
php artisan make:form path\FormClass
After generate form class, you can check file in app\Services\Form path. Ex: generate form for component, you can run command like this php artisan make:form Component\ComponentForm. You can check file in app\Services\Form\Component\ComponentForm.php.
Generate constant class (for component)
// Generate basic constant for ID(int) and Name(string)
php artisan make:constant path\ConstantClass
// Generate constant for Code(string) and Name(string)
php artisan make:constant path\ConstantClass -c
After generate constant class with command, you can check class in app\Services\Constant\Path\ConstantClass.php.
Generate parser class
php artisan make:parser path\ParserClass
After generate parser class, you can check parser class in app\Services\Parser\Path\ParserClass.php.
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-22