levaral-dev / core-v2
Levaral foundation package for Laravel Framework
Requires
- php: ^7.0
- doctrine/common: ^2.9@dev
- doctrine/dbal: ^2.5
- gossi/php-code-generator: dev-master
- guzzlehttp/guzzle: ~6.0
- laravel/framework: 5.7.*|5.8.*
This package is not auto-updated.
Last update: 2021-01-30 03:01:06 UTC
README
composer require levaral-dev/core-v2:dev-master
Commands
This command will generate base structure.
levaral:structure
This command will generate all the base classes of the models.
levaral:levaral:generate-model-base
This command will generate all the [api routes/api services] in plain javascript objects
levaral:api-js
This command will generate action class in Actions folder.
make:action {namespace}
for e.g
make:action 'User\Profile\GetDetail'
This command will generate model and the base classes in Domain folder.
make:model {namespace}
This command will scan all the Actions in Api
folder and generate test classes
levaral:generate-test
This command will generate language files for frontend
levaral:generate-language-json
Action Routes
Action routes can be defined in any laravel route files like (web.php, api.php etc..), when using action routes you don't need to define named route, it will be generated automatically.
for e.g
Action::get('get-detail', \App\Http\Actions\User\GetDetail::class); // route name User:GetDetail Action::post('get-detail', \App\Http\Actions\User\PostDetail::class); // route name User:PostDetail Action::post('get-detail', \App\Http\Actions\User\PostDetail::class); // route name User:PostDetail Action::post('get-detail', \App\Http\Actions\User\Profile\GetDetail::class); // route name User:Profile:PostDetail
Models
document WIP