DocsDeveloper guideBuild an add-on
Folder layout
What goes where inside app/Addons/<Name>, and which file the system reads for each part.
1 min read
| Path | What it is | Read by |
|---|---|---|
addon.php | The manifest: name, version, rights, menu, URL segments. Data only. | app/Support/AddonRegistry.php |
routes.php | Signed-in pages, mounted inside web + auth. | app/Providers/AddonServiceProvider.php:152-162 |
public_routes.php | Public pages (share links, kiosks, website), mounted outside the sign-in. | app/Support/Addons/AddonRoutes.php:27-45 |
Controllers/, Models/, Support/ | Your PHP classes, namespace App\Addons\<Name>\.... | Composer's App\ map; a root outside App\ is autoloaded as Addons\<Name>\... (app/Providers/AddonServiceProvider.php:35-52) |
database/migrations/ | Your tables. Each file name must start <date>_<time>_<slug>_. | app/Providers/AddonServiceProvider.php:118-125, app/Support/Addons/BundledAddons.php:103-112 |
dist/addon.js, dist/addon.css, dist/icon.svg | The built browser bundle, its stylesheet and the app icon. | copied to public/build-addons/<slug>/ on activation (app/Support/Addons/AddonInstaller.php:238-278) |
public/ | Files served at public/addons/<folder> (manifest public_assets). | app/Support/Addons/AddonInstaller.php:280-293 |
Hello Notes uses six files:
app/Addons/Hello/
addon.php
routes.php
Controllers/HelloController.php
Models/HelloNote.php
database/migrations/2027_04_01_000100_hello_create_notes.php
dist/addon.js