Hey, I'm writing a book.  Eloquent Beyond The Basics

🔥 Laravel Tip: Prevent model hydration on Eloquent queries

Nov 18, 2022

If you want to take advantage of Eloquent features (ex: scopes, soft deletes, etc).

But you don't want the query to hydrate models for performance reasons. You can call the `toBase` method on your query.
tip-image-0