wyattcast44/hub-for-laravel
Composer 安装命令:
composer create-project wyattcast44/hub-for-laravel
包简介
A tool for scaffolding new Laravel applications.
README 文档
README
composer require wyattcast44/hub-for-laravel // or composer global require wyattcast44/hub-for-laravel
Updating
composer update wyattcast44/hub-for-laravel // or composer global update wyattcast44/hub-for-laravel
Inspiration
- Matt Stauffer / Tighten Lambo
- Docker Compose
- Docker Hub
- Laravel Blueprint
- GitHub Actions
Discussion Points w/Matt
- Laravel Hub CLI
- Drop-in replacement for Laravel installer
- Still use Laravel installer under the hood to capture all the goodness they release
- Recipes written in YAML
- Sharing recipes
- Inheriting recipes (docker images inspo)
- Laravel Hub Web App
- Docker Hub Inspo
- Nova Packages Inspo
- Packages
- Related packages
- Analytics
- Official packages
- Recipes
- Starter Kits
- Basically a one-stop shop for Laravel ecosystem
- Ideally would be an official Laravel property: hub.laravel.com
- I don't want it to compete against Laravel News, Laravel.io, etc
- PHP vs Yaml
- PHP for starter kits? (see app.php)
- Yaml for composing steps? (see app.yaml)
- PHP API
Usage
You can use the CLI as a near drop-in replacement for the offical Laravel installer. For example:
laravel-hub new project
But the real power of the tool is when you create a compose file. The compose file is your basic recipe for your application. You should create an app.yaml file in the directory where you would like to create your application.
touch app.yaml
When you are done crafting your recipe (see docs below), you should run the compose command:
laravel-hub compose {script=app.yaml}
If your compose file is named something other than app.yaml, pass the name of your file as the first argument.
Compose File API
- env
- git
- name
- touch
- mkdir
- artisan
- console
- version
- blueprint
- php-packages
- php-packages-dev
- npm-packages
- npm-packages-dev
env
The env API allows you update or insert (upsert) keys in the applications .env file.
An example is show below:
env: APP_NAME: "Laravel" DB_DATABASE: "laravel" NEW_ENV_KEY: "value"
git
The git API allows you to signal that you would like a git repository to be created and commits to be made for each step. The possible values are: true or false
An example is show below:
git: true
name
- Required: True
The name key is required, the sluggified version of the name will be used to generate the folder name where the application will be installed.
touch
The touch API allows you create files in your application. Any required directories will also be created.
An example is show below:
touch: - "app/Support/helpers.php"
mkdir
The mkdir API allows you create directories in your application. Any required parent directories will also be created.
An example is show below:
mkdir: - "resources/svg"
artisan
The artisan API allows you run Laravel Artisan commands in your application.
An example is show below:
artisan: - storage:link - make:model Post -mfc
console
The console API allows you create run console commands in your application.
An example is show below:
console: - git init - code .
version
The version API allows you to declare what version of Laravel you want to install. You can specify any valid composer version.
An example is show below:
version: "7.x"
blueprint
The blueprint API is an special key. It installs the powerful Laravel Blueprint package as a dev dependency. It then take the value of the key and writes this to a draft.yaml file in your project. This allows you to scaffold anything that the Laravel Blueprint package can create.
An example is show below:
blueprint: models: Post: title: string:400 content: longtext published_at: nullable timestamp author_id: id:user controllers: Post: index: query: all render: post.index with:posts store: validate: title, content, author_id save: post send: ReviewPost to:post.author.email with:post dispatch: SyncMedia with:post fire: NewPost with:post flash: post.title redirect: post.index
php-packages
The php-packages API allows you require composer packages into your application.
An example is show below:
php-packages: - laravel/telescope - laravel/socialite
php-packages-dev
The php-packages-dev API allows you require dev only composer packages into your application.
An example is show below:
php-packages-dev: - brianium/paratest
npm-packages
The npm-packages API allows you install NPM packages into your application.
An example is show below:
npm-packages: - "tailwindcss/@latest"
npm-packages-dev
The npm-packages API allows you install NPM dev packages into your application.
An example is show below:
npm-packages-dev: - "alpinejs"
Cookbook
Basic
This basic recipe will simply create a new Laravel application and set some env values
name: "Basic Laravel Recipe" env: APP_NAME: "Basic Recipe" DB_DATABASE: "basic"
Advanced
This advanced recipe will create a new Laravel application and then clone a existing repo and copy some files into your new application. And then launch the app with VS Code.
name: "Advanced Laravel Recipe" env: APP_NAME: "Advanced Recipe" DB_DATABASE: "advanced" console: - git clone "https://github.com/WyattCast44/laravel-starter-app-tall" "source" - cp -R "source/resources/views" "resources" - cp "source/routes/auth.php" "routes/auth.php" - rm -rf "source" - code .
wyattcast44/hub-for-laravel 适用场景与选型建议
wyattcast44/hub-for-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 03 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「cli」 「console」 「laravel」 「Laravel Zero」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wyattcast44/hub-for-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wyattcast44/hub-for-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wyattcast44/hub-for-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This class provides you with an easy-to-use interface to progress bars.
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
A Laravel package to retrieve data from Google Search Console
Additional artisan commands for Laravel
A table generator class for the PHP CLI.
Slim starter / Slim skeleton package to boost your development with Slim framework
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-19