Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Twill Laravel Package

area17/twill

Twill is an open-source Laravel package for building a custom CMS fast. It provides a polished admin UI with prebuilt features and Vue components, stays flexible and extensible, works headless or integrated, and lets you use your own models with no lock-in.

View on GitHub
Deep Wiki
Context7

Creating a package

As mentioned in the introduction, a Twill package is at its core the same as a regular Laravel package.

If you are new to Laravel package development you can read more about it in the Laravel documentation.

Generating your first Twill package

To make it a bit easier to get started we made a command you can use to kickstart your Twill package.

php artisan twill:make:package

After filling in the questions, a package with a composer.json and TwillPackageServiceProvider will be created.

The package generate command provides instructions on how to install it while working on it locally.

Your package has been generated!

You can now add it to your project's composer json repositories to work on it:

"repositories": [
    {
        "type": "path",
        "url": "./packages/twill-extension"
    },
],

Then you can require it: composer require area17/twill-extension

By default the package has no functionality, you can add a first capsule using (Replace YourModel with the model you want to use):

php artisan twill:make:capsule YourModel --singleton --packageDirectory=./packages/twill-extension --packageNamespace=TwillExtension\\YourModel

Enjoy!

And that's it, your first package is now created and enabled for your twill installation.

It is however, still empty so lets add a module as the instructions mention:

php artisan twill:make:capsule Project --packageDirectory=./packages/twill-extension --packageNamespace=TwillExtension\\Project

The command above will create a capsule, if you want to create a singleton capsule you could use php artisan twill:make:capsule --singleton instead.

Once this is done you already can go ahead and refresh your twill admin and the new capsule should appear in the menu!

If you get an error when visiting, do not forget to run your database migrations.

And that's it! You can now make Twill packages with capsules!

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport