Lucid Console
The Console companion for the Lucid Architecture.
Last updated
Was this helpful?
The Console companion for the Lucid Architecture.
Last updated
Was this helpful?
Console is a set of methods to easily manage [create, delete] Lucid components such as Jobs, Operations, Features as well as Laravel's own components such as Controller, Eloquent Model, Request and many more; ensuring that they go where they belong and are generated with their test companion to assist you as you build your application. These methods are exposed through a and a .
Console ships with a command-line interface called lucid
that you can find at vendor/bin/lucid
after running composer install
in the root of your application. It is used as
For convenience you might want to address lucid
directly instead of having to go through ./vendor/bin
every time. To do that you need to add ./vendor/bin
as part of your shell session's $PATH
. For the current session, run:
However, it will only be available for the current session. To make it permanent, add it to your shell profile (~/.bash_profile
, ~/.bashrc
, ~/.zshrc
) and you will be able to simply call lucid
from the application's root directory.
To view a list of all available lucid
commands, you may use the list
command:
Also, just like in Artisan, every command includes a "help" screen which displays and describes the command's available arguments and options. To view a help screen, precede the name of the command with help
:
Set the root namespace with:
make
Microservice: N/A
Monolith: src/Services/<name>
Microservice: app/Http/Controller
Monolith: src/Services/<service>/Http/<controller>
Generate Feature Class
Microservice: app/Features/<feature>
Monolith: src/Services/<service>/Features/<feature>
Generate Job Class in a Domain
Microservice: app/Domains/<domain>/Jobs/<job>
Monolith: src/Domains/<domain>/Jobs/<job>
Microservice: database/migrations/<migration>
Monolith: src/Services/<service>/database/migrations/<migration>
Microservice: app/Data/<model>
Monolith: src/Data/<model>
Microservice: app/Http/Requests/<request>
Monolith: src/Services/<service>/Http/Requests/<request>
Microservice: app/Policies
Monolith: src/Policies
Microservice: app/Operations/<operation>
Monolith: src/Services/<service>/Operations/<operation>
list
delete
These are pretty obvious.
delete:service <name>
delete:feature <feature> [<service>]
delete:job <job> <domain>
delete:model <model>
delete:request <request> [<service>]
delete:policy <policy>