- https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes
- https://www.reddit.com/r/laravel/comments/3to60i/50_laravel_tricks/
- 1. Automatic Model Validation
| [ | |
| { | |
| "id": 1, | |
| "name": "Afghanistan", | |
| "iso3": "AFG", | |
| "iso2": "AF", | |
| "phone_code": "93", | |
| "capital": "Kabul", | |
| "currency": "AFN" | |
| }, |
| You can create a new empty branch like this: | |
| $ git checkout --orphan NEWBRANCH | |
| --orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry. | |
| The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch. | |
| Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory: |