levaral-dev/core-v2

This package is abandoned and no longer maintained. No replacement package was suggested.

Levaral foundation package for Laravel Framework

dev-master 2019-02-27 07:52 UTC

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