
All Source and content copied and paste from their original documents.
Please follow those
Twill Doc- https://twill.io/docs/
php artisan twill:module moduleName
The command accepts several options:
--hasBlocks (-B)
, to use the block editor on your module form--hasTranslation (-T)
, to add content in multiple languages--hasSlug (-S)
, to generate slugs based on one or multiple fields in your model--hasMedias (-M)
, to attach images to your records--hasFiles (-F)
, to attach files to your records--hasPosition (-P)
, to allow manually reordering of records in the listing screen--hasRevisions(-R)
, to allow comparing and restoring past revisions of records--hasNesting(-N)
, to enable nested items in the module listing (see Nested Module)
Add the route to your admin routes file(routes/admin.php
).
<?php
Route::module('moduleName');
Setup a new CMS navigation item in config/twill-navigation.php
.
return [
...
'moduleName' => [
'title' => 'Module name',
'module' => true
]
...
]
All done, php artisan config:cache