Skip to content

Conventions

Michał Golon edited this page Jul 11, 2018 · 1 revision

I prefer convention over configuration approach, therefore this package utilizes some conventions that come from Laravel.

Presented conventions are used by routing and console elements.

Naming

All the actions should have Action postfix added to the class name, for example ShowUserAction.

All the responders should have Responder postfix added to the class name, for example ShowUserActionResponder.

Suggested postfixes are used by responder's default auto-resolving mechanism (described here).

File placement

All the actions should be placed in app/Http/Actions directory.

All the responders should be placed in app/Http/Responders directory.

Suggested directories are used by Artisan generators (described here).

Clone this wiki locally