- https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes
- https://www.reddit.com/r/laravel/comments/3to60i/50_laravel_tricks/
A. Eloquent
- Automatic Model Validation
| # Demonstration of inspecting all the routes, including those on sub-apps, | |
| # from the default app instance. | |
| # | |
| # This should be run directly to print a list of route prefixes and the rules. | |
| # Tested with Python 2.7 and Bottle-dev. Patch here | |
| # https://github.com/davidwtbuxton/bottle/commit/ddd712ef252b06ecd0e957f8ac4e37b65ee79cae | |
| import bottle | |
| subapp = bottle.Bottle() |
A. Eloquent
Getting started:
Related tutorials:
| <?php | |
| function lookuppostcode($postcode) { | |
| $postcode = str_replace(" ", "", $postcode); | |
| $key = 'YOUR_API_KEY'; | |
| $request = 'https://api.getAddress.io/v2/uk/' . $postcode . '?api-key=' . $key; | |
| $response = file_get_contents($request); | |
| $response = json_decode($response, true); | |
| $returnData = array(); |