Abusing Laravel for Fun and Profit
summary
Four concrete Laravel techniques: use the pipeline filters pattern to move request-driven query constraints into middleware-like classes so paginated invoice lists stay composable; reuse database seeders as rich test fixtures to make feature tests short and reproducible; attach data-access traits to form request objects to encapsulate invoice queries and pagination (used in PushSilver); and store cron expressions plus time zones on models and leverage the managesFrequencies trait with the Laravel scheduler to dispatch per-model jobs reliably.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:36DADS IN DEV
- 1:47FORGE
- 2:23Confession Time.
- 9:27Let's refactor InvoiceController
- 12:04FRONT-END FILTERS USING PIPELINES
- 12:24FEATURE TESTS POWERED BY DATABASE SEEDERS
- 19:16FORM REQUESTS FOR DATABASE ACCESS
- 19:34Straight Eloquent Calls in the Controller
- 20:13The Repository Pattern & Service Classes
- 21:09Data-Access Traits
- 22:53Stick them on Form Request objects
- 28:10OK (2 test, 2 assertions)
- 28:57SCHEDULING MODELS WITH LARAVEL SHEDULER
- 32:01Polymorphism
- 33:14Laravel Already Has A Built-in Way To Schedule Jobs
- 35:01Back to the original problem.
- 37:26Generating Cron Strings Using Dirty Hacks
related talks
40mEngineering Complex Applications with Laravel 4
21mSoftware Design Patterns in Laravel 4
38mLaravel Design Patterns
54mState of Laravel
35mCode Refactoring Workshop
25mWriting resilient code
49mLaravel - If, how and why you should use it!
25mLess Pain with Gain, how Laravel helps you scale your Applications
