Building RESTful APIs with Laravel 5's Doc Block-based Controller Annotations
summary
Shows a working workflow that uses Laravel 5 doc block controller annotations compiled into runtime routes and event maps rather than hand-editing routes.php. Uses php artisan route scan to generate routes.scan.php and events.scan.php, demonstrates a hotels controller with a search GET, a reservations POST that dispatches a command on the command bus and fires a room was reserved event handled by an email listener. Notes interaction with Laravel route caching and that the annotations package lives with the laravel collective.
AI-written summary · about
chapters (34)
- 0:00Intro
- 4:02History of Laravel
- 5:56Laravel 5 Changes
- 8:28History of Annotations
- 16:03Comparing to Symphony
- 18:40Reservation Controller
- 20:22Make Command
- 22:45Handle Event
- 25:28Recap
- 27:12Cached Routes
- 28:17Options
- 29:06Advantages
- 30:59Documentation
- 31:32Disadvantages
- 32:20Tightly linking controller to route
- 32:52Single developer deployment
- 33:36The future of annotations
- 34:50How can we handle annotations
- 35:48Grouping controllers together
- 37:50Not with annotations and comments
- 38:25Github repository
- 39:11Laravel 5 update
- 39:26Where did the event come from
- 39:47ReserveRoom
- 40:21ReservedEvent
- 41:04Shortcut
- 42:11Alias
- 43:18Framework
- 43:42Overhead
- 45:39Cache
- 46:21Performance
- 46:51Read into memory
- 47:24Read time
- 47:52Laravel 5 Beta
related talks
18mRESTful API: What's New in Laravel 5.5
26mBehaviour Driven Development with Laravel
29mLuke Downing :: Lessons from the Laravel Framework
31mModern PHP development with Laravel 5.6
41mBuilding first-class REST APIs with Symfony
21mSoftware Design Patterns in Laravel 4
41mBuilding Restful APIs with Symfony Components
33mZero to API with Lumen
