Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Add support for custom template #348

Closed
wants to merge 1 commit into from
Closed

[5.x] Add support for custom template #348

wants to merge 1 commit into from

Conversation

joshmanders
Copy link

This feature was attempted 3 years ago but was rejected. But with changes in the landscape and more people finding out about the awesome benefits of Laravel coming from JavaScript world, they're used to easy to get started with create-*-app style installers.

The default laravel installer is great, but as end users there's a lot left to be desired. Being able to quickly scaffold out a jetstream or a breeze app is fine, but allowing the community to build out more robust starting skeletons and giving a Laravel sanctioned way to install those skeletons will improve people picking up Laravel a lot quicker.

Usage

You can now just utilize the --template flag to specify a non-default skeleton template to use, (this defaults to laravel/laravel) like so:

laravel new blog --template foo/laravel-blog

Prerequisites

  • Template repository should have been submited to composer's packagist
  • Template repository should have at least a release tag for it to be installed.
  • Template repository should have a master branch if the --dev installer option is specified as installer expects.

Considerations

Some of the options should be ignored when using a template that isn't the default, so maybe I can amend this PR to disable breeze/jetstream/etc if --template flag is used.

@taylorotwell
Copy link
Member

I think it's better to just use composer create-project for this purpose. Otherwise the new command has a bunch of options that don't even make sense.

@joshmanders
Copy link
Author

I think it's better to just use composer create-project for this purpose. Otherwise the new command has a bunch of options that don't even make sense.

That's why I had the considerations section. But there's also a bunch of things the new command does that composer create-project doesn't do that adds a bunch of extra overhead for newbies coming from other places.

@NickSdot
Copy link

Good. Groundwork for an official Laravel marketplace.

People can distribute their packages how they want and without limitations.

Then there is the marketplace. If paid, or freemium, packages want to get listed on the Marketplace to benefit from the Laravel effect they pay.

Win-win-win. Go Taylor do that already.

@joshmanders joshmanders deleted the feature/configurable-templates branch June 23, 2024 21:13
@joshmanders
Copy link
Author

I have forked the installer to create a laranew global CLI for this to hopefully show Taylor that the community will benefit from this ability and we can think of bringing it in natively. https://github.com/aniftyco/laranew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants