Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 3.2 KB

README.md

File metadata and controls

70 lines (49 loc) · 3.2 KB

new-laravel-project

Simple bash script to create a new Laravel project, create a git repo, push it and configure/run Homestead & Vagrant.

Motivation

I frequently create new Laravel projects, and tire of having to run the same set of commands over and over again. This script wraps it all up.

Files

File Description
new_laravel_project.sh Creates a new project, if no options specified it will prompt for options.

Usage

Feel free to adjust to your own needs. If you make changes that would be useful to others then pull requests will be welcomed.

The script is not marked as executable by default, if you wish to do so use: chmod +x new_laravel_project.sh

I like to keep my projects in a folder set like this: Awesome/awesome with the top level (capitalised) folder giving me a place to add any miscellaneous files that will not be added to the git repository, and the lowercase folder inside being the actual code/git repository. As such this script expects you to specify the project name in lowercase and it will automatically create the aforementioned folder structure. If you don't like this, do change it as you require.

Options:

-n|--name               Name of the project (it expects lowercase)
-r|--repo-url           Optional: Git repository URL to push to
-u|--vagrant-up         Optional: Run "vagrant up"
-e|--edit-homestead     Optional: Prompt to edit the Homestead.yaml file
-i|--interactive        Optional: Run interactively
-y|--no-prompts         Optional: Run without any confirmation

Example:

$ bash new_laravel_project.sh --name SomeProjectName --repo-url [email protected]:myusername/myproject.git --edit-homestead --vagrant-up

Feel free to get in touch with feedback: @cosmicvibes alt text