menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Twill

Rapidly create a custom admin console that content publishers will love. Twill is an open source CMS toolkit for Laravel, crafted by AREA 17.

Channels
Team

Create a Twill app in one line

March 15, 2019 at 8:48pm

Create a Twill app in one line

March 15, 2019 at 8:48pm (Edited 4 years ago)
I made a composer package create-twill-app to help people create a fresh twill app in one line.
I found this small tool was super useful during the past few months, whenever I needed to create a new twill app either for testing purpose or as a real world product.
The only problem at that time was it cost too much time on compiling assets, however, thanks to the Twill 1.2.1 release which get Laravel Mix 4 updated, the installation time now has been decreased significantly by almost 200%.
Thus now maybe a good time to share it with all other developers who love Twill.

Requirements

  • PHP >= 7.1.3
  • An empty MySQL database
  • Composer

Usage

First, download the create-twill-app package using Composer:
composer global require yanhaoli/create-twill-app
Then, use the installer to create a fresh twill application:
create-twill-app new blog
It will ask you to enter the database infomation during the installation:
Enter your database host ["127.0.0.1"]: 127.0.0.1
Enter your database username ["homestead"]: homestead
Enter your database password ["secret"]: secret
Enter your database name ["homestead"]: homestead
Once you see the message Laravel development server started:, that means the installation has been completed.
Now, access Twill's beautiful login console by typing http://localhost:8000/admin in your browser, enjoy!
Screen Shot 2019-03-15 at 4.11.45 PM.png
Show previous messages

March 15, 2019 at 9:54pm
does Twill support Postgres?
and Laravel 5.8 now, will update that!

March 20, 2019 at 7:48pm
Just used it, works great! Thanks
Edited

March 22, 2019 at 7:04pm
I have a Postgres database setup locally on my Mac, but I can't get create-twill-app to connect to my DB and thus it never completes setup. Any ideas how I can mitigate this?
yes! Edit the .env file in the generated project before submitted DB credentials in console: change DB_CONNECTION from mysql to pgsql. We could definitely update create-twill-app to ask for the DB_CONNECTION variable !
Edited
like-fill
2
Awesome (also the DB_PORT will need to be set based on the DB_CONNECTION). Ok, so I did that. Now what command do I use to get the dev server started?
So I think becase the DB portion of create-twill-app got interrupted, the installation didn't complete correctly. I've tried running php artisan twill:install and php artisan serve but can't get http://localhost:8000/admin to resolve without errors.
like-fill
1

March 25, 2019 at 2:26pm
absolutely, I'm happy to add it in order to support postgres!
like-fill
1

May 26, 2019 at 10:32am
Great work!! it has serve me as a guide to required steps in order to have a running Twill app. Lot of thanks =) Hope i can contribute with the backend soon.

July 3, 2019 at 10:08pm
create-twill-app has released version 0.0.4
Added support for Postgres and Fixed some issues.
Thanks for 's contribution.
Edited
like-fill
3

July 15, 2019 at 10:33am
I created an account just to thank you for this, makes my job much easier!
like-fill
1

August 26, 2019 at 11:44am
Hi there, First of all I would like to thank you all for such a great and amazing product which I bet took a lot of energy and time. Secondly, can anyone guide me why I can't run it locally on my Mac with MYSQL, I'm following all the steps even migration is working fine but when I go to php artisan serve ( 127.0.0.1:8000) and trying to go to admin panel (127.0.0.1:8000/admin) it returns 404.. any help, please ?

September 4, 2019 at 10:45am
got an issue after laravel updated to version 6..

September 23, 2019 at 7:15pm
1.0.0 has been released. Please use following command to upgrade your local copy:
composer global require yanhaoli/create-twill-app:"1.0.*"
Hi , I think this issue has been fixed in 1.0.0, otherwise, you could try 127.0.0.1:8000/admin/login

September 26, 2019 at 2:01am
Hi at the moment Twill supports up to Laravel 5.8 but you can check our progress on Laravel 6 support on GitHub. We are planning to release Twill 2.0 with Laravel 6 support in the next 2 weeks.

November 8, 2019 at 12:46am
Helllo, Do you have updated version? 1.2.1?
Yes, 1.2.1 has been supported!
Do I need to change it to "composer global require yanhaoli/create-twill-app:"1.2.*" ??

November 8, 2019 at 11:35am
nope, as the create-twill-app is using a different version system from twill, ao-li/create-twill-app/releases. The newest version for it is 1.0.2
like-fill
1

November 25, 2019 at 11:43am
I get this error when I run composer global require yanhaoli/create-twill-app I am using valet to manage php versions.
```Problem 1
- yanhaoli/create-twill-app 1.0.0 requires symfony/finder ^4.2 -> satisfiable by symfony/finder[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.4.0].
- yanhaoli/create-twill-app 1.0.1 requires symfony/finder ^4.2 -> satisfiable by symfony/finder[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.4.0].
- yanhaoli/create-twill-app 1.0.2 requires symfony/finder ^4.2 -> satisfiable by symfony/finder[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.4.0].
- yanhaoli/create-twill-app 1.0.3 requires symfony/finder ^4.2 -> satisfiable by symfony/finder[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.4.0].
- yanhaoli/create-twill-app 1.0.4 requires symfony/finder ^4.2 -> satisfiable by symfony/finder[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.4.0].
- symfony/finder v4.4.0 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.3.8 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.3.7 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.3.6 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.3.5 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.3.4 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.3.3 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.3.2 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.3.1 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.3.0 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.9 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.8 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.7 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.6 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.5 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.4 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.3 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.2 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.12 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.11 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.10 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.1 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- symfony/finder v4.2.0 requires php ^7.1.3 -> your PHP version (7.1.30) overridden by "config.platform.php" version (5.6.40) does not satisfy that requirement.
- Installation request for yanhaoli/create-twill-app ^1.0 -> satisfiable by yanhaoli/create-twill-app[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4].
```
Edited

March 18, 2020 at 9:36pm
this can be use for twill 2.0 ?
Show more messages