- 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
| <?php | |
| require 'json.php'; | |
| $json = new JSON; | |
| $json->foo->bar->baz = "foo"; | |
| $json->foo->biz = "test"; | |
| $json->baz = array(); | |
| $json->baz[1] = "testing"; |
| #!/user/bin/env python | |
| import json | |
| import sys | |
| from types import * | |
| def cpp_type(value): | |
| if type(value) is IntType: | |
| return 'int' | |
| elif type(value) is FloatType: |