php artisan make:solution writes a new Solution package: the same pieces as
Hello World, under your own vendor and namespace, ready to
install into a Core checkout. Run it from the root of the checkout.
Everything is checked before anything is written. The command exits with 1 and writes nothing when the package name
is not a valid Composer name, when a namespace segment is not a PHP identifier (pass
--namespace, for example for
acme/solution-2fa), when Foundation rejects the manifest, or when the target directory exists and is not empty.
What it generates
<Class> is the last segment of the namespace.
Next steps
1
Install it into Core
Add the package to
composer.overlay.json, then run composer overlay. See
Development setup.2
Let Core validate it and switch it on
3
Develop the UI against the running Core
In the package run
npm ci, then npx vite build --watch. In Core run php artisan solutions:watch: it
publishes each build to the running Core, see
Developing against a running Core. Before you
commit, run npm run build and commit dist/.4
Run the tests
For the default
packages/<name>, from the package directory: php ../../vendor/bin/phpunit -c phpunit.xml. The
generated README carries the overlay entry and the commands for the path the package was generated in. A package
outside the Core checkout finds Core through the FAPOST_CORE_PATH environment variable: set it to Core’s root.