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
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
:
Available Commands
Set the root namespace with:
namespace
make
make
Generate Service Directory Structure
Microservice: N/A
Monolith:
src/Services/<name>
Generate Controller
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>
Generate Migration
Microservice:
database/migrations/<migration>
Monolith:
src/Services/<service>/database/migrations/<migration>
Generate Eloquent Model Class
Microservice:
app/Data/<model>
Monolith:
src/Data/<model>
Generate Request Class
Microservice:
app/Http/Requests/<request>
Monolith:
src/Services/<service>/Http/Requests/<request>
Generate Policy Class
Microservice:
app/Policies
Monolith:
src/Policies
Generate Operation Class
Microservice:
app/Operations/<operation>
Monolith:
src/Services/<service>/Operations/<operation>
list
list
List Services in a Monolith
List Features
In a Monolith, specify the Service to scope the list.
delete
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>
User Interface
Last updated