globalxtreme / laravel-backend-service
GlobalXtreme Default Backend Service V2.
Installs: 47
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.3
- globalxtreme/php-storage: ^1.0
- globalxtreme/rabbitmq: 2.0.19
- globalxtreme/response: ^2.0
- globalxtreme/validation: ^1.1
- laravel/framework: ^11.0
- laravel/tinker: ^2.9
Requires (Dev)
- fakerphp/faker: ^1.23
- laravel/pint: ^1.13
- laravel/sail: ^1.26
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.0
- phpunit/phpunit: ^11.0.1
- spatie/laravel-ignition: ^2.4
- dev-master
- v2.1.x-dev
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.x-dev
- v2.0.2
- v2.0.1
- v2.0.0
- v1.1.x-dev
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-12-05 05:08:16 UTC
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.