Lucid Console
The Console companion for the Lucid Architecture.
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 command-line interface and a user interface.
Command-Line Interface
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
lucid make:feature ListUsers ApiFor 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:
export PATH="./vendor/bin:$PATH"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:
lucid listAlso, 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:
lucid help make:featureAvailable Commands
Set the root namespace with:
namespace
src:name <namespace>make
makeGenerate Service Directory Structure
make:service <name>Microservice: N/A
Monolith:
src/Services/<name>
Generate Controller
make:controller <controller> [<service>]Microservice:
app/Http/ControllerMonolith:
src/Services/<service>/Http/<controller>
Generate Feature Class
make:feature <feature> [<service>]Microservice:
app/Features/<feature>Monolith:
src/Services/<service>/Features/<feature>
Generate Job Class in a Domain
make:job <job> <domain> [--queue]Microservice:
app/Domains/<domain>/Jobs/<job>Monolith:
src/Domains/<domain>/Jobs/<job>
Generate Migration
make:migration <migration> [<service>]Microservice:
database/migrations/<migration>Monolith:
src/Services/<service>/database/migrations/<migration>
Generate Eloquent Model Class
make:model <model>Microservice:
app/Data/<model>Monolith:
src/Data/<model>
Generate Request Class
make:request <request> [<service>]Microservice:
app/Http/Requests/<request>Monolith:
src/Services/<service>/Http/Requests/<request>
Generate Policy Class
make:policy <policy>Microservice:
app/PoliciesMonolith:
src/Policies
Generate Operation Class
make:operation <operation> [<service>]Microservice:
app/Operations/<operation>Monolith:
src/Services/<service>/Operations/<operation>
list
listList Services in a Monolith
list:servicesList Features
list:features [<service>]delete
deleteThese are pretty obvious.
delete:service <name>delete:feature <feature> [<service>]delete:job <job> <domain>delete:model <model>delete:request <request> [<service>]delete:policy <policy>
User Interface
Last updated
Was this helpful?