Getting Started

Installation

Nexus Generator is included in the Nexus site template.

To add it to an existing site, you will need to upgrade to Nexus 5.0+ and Laravel 8.61+, give the application permission to use it in the PHP Packages app, then run:

scripts/composer.sh require --dev alberon/nexus-generator

Usage

To access Nexus Generator, visit <prefix>/nexus-generator (prefix is normally blank, but sometimes set to /admin), or use the link in Laravel Debugbar > Links > Tools.

To generate a new module (table, model, controller, etc.), click New and fill in the form. When you press Save, the files will be generated.

If there is functionality not included in the generated code, you have two options:

  1. Modify Nexus Generator (create a merge request) with the new functionality as an option. This is the better long-term option (if the functionality is reusable), but more complicated in the short-term.

  2. Modify the generated files directly.

Note: Making any further changes to the module in Nexus Generator will cause your customisations to be overwritten. In the future, I hope to add functionality to merge changes.