wyattcast44/hub-for-laravel is a Laravel package for a tool for scaffolding new laravel applications..
It currently has 0 GitHub stars and 0 downloads on Packagist.
Install it with composer require wyattcast44/hub-for-laravel.
Discover more Laravel packages by wyattcast44
or browse all Laravel packages to compare alternatives.
Last updated
composer require wyattcast44/hub-for-laravel
// or
composer global require wyattcast44/hub-for-laravel
composer update wyattcast44/hub-for-laravel
// or
composer global update wyattcast44/hub-for-laravel
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.
envThe 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"
gitThe 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
nameThe name key is required, the sluggified version of the name will be used to generate the folder name where the application will be installed.
touchThe 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"
mkdirThe 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"
artisanThe artisan API allows you run Laravel Artisan commands in your application.
An example is show below:
artisan:
- storage:link
- make:model Post -mfc
consoleThe console API allows you create run console commands in your application.
An example is show below:
console:
- git init
- code .
versionThe 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"
blueprintThe 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-packagesThe php-packages API allows you require composer packages into your application.
An example is show below:
php-packages:
- laravel/telescope
- laravel/socialite
php-packages-devThe 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-packagesThe npm-packages API allows you install NPM packages into your application.
An example is show below:
npm-packages:
- "tailwindcss/@latest"
npm-packages-devThe npm-packages API allows you install NPM dev packages into your application.
An example is show below:
npm-packages-dev:
- "alpinejs"
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"
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 .