Last active
January 20, 2016 14:37
-
-
Save rdev5/74ed0e53184bf98ed0dd to your computer and use it in GitHub Desktop.
Scaffolding shortcuts for Laravel application outlined at https://laravel.com/docs/master/quickstart-intermediate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# author: matt borja | |
cat "$0" | |
exit | |
# setup auth | |
php artisan migrate | |
php artisan make:auth | |
# cleanup "web" middleware | |
nano -w app/Http/routes.asp | |
# create database migrations for model | |
php artisan make:migration | |
# create models | |
php artisan make:model | |
# - populate model's $fillable[] (protected) with mass-assignable properties | |
# - add methods to relate 1:N such as: User#tasks() returns $this->hasMany(Task::class) | |
# - add reciprocal method to relate parent such as: Task#user() returns $this->belongsTo(User::class) | |
# create basic layout | |
nano -w resources/views/layouts/app.blade.php | |
# create views | |
mkdir -p resources/views/ | |
# create repositories | |
mkdir -p app/Repositories/ | |
# create controllers, apply middleware, and refactor views as needed | |
php artisan make:controller | |
# create and bind model policies | |
php artisan make:policy | |
nano -w app/Providers/AuthServiceProvider.php | |
# refactor views |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment