php artisan make:model does more than scaffold a bare class. These flags save you the follow-up commands.
Tips
Stop hardcoding foreign key column names in every query. whereBelongsTo() reads the relationship definition for you.
N+1 queries usually get discovered in production. This one setting makes Eloquent throw the moment they happen locally instead.
Calling five APIs one after another adds up their latencies. Http::pool() fires them concurrently and waits once.
Stop hand-rolling LIKE clauses with percent signs. These built-in query builder methods read cleaner and avoid dialect quirks.
Eager loading the parent relation still triggers a query per child model. chaperone() closes that gap for free.
Laravel's once() helper memoizes a closure's return value for the current request or process — here's when to reach for it.
Laravel's Sleep facade replaces raw sleep() calls with a fluent, fully testable API — no more multi-second test suites.
Your config/database.php connections aren't fixed at boot. Here's how to pick, register, and reset connections at runtime.
Skip the old Rule::passes()/message() dance. Build reusable, testable validation logic with ValidationRule invokable classes.
Replace nested string function calls and ternaries with Str::of() chains that read top to bottom and are easy to extend.
Three Eloquent shortcuts look almost identical. Here is how firstOrCreate, updateOrCreate, and firstOrNew actually differ, and when each one bites you.