Laravel Pro Tips
#models #select
πΆοΈ #Laravel tip: You can select the columns to run when using the Model::all() method. No need for an additional select() method. A tiny tip to always keep in mind π‘ #PHP #Developers
Bilal Haidar - Available 4 Laravel gigs
#eloquent #models
When calling Eloquent's Model::all() or Model::get() you can specify which columns to load πββοΈ
Daniel Eckermann
#migrations
π₯ Epic Laravel Tip - Did you know that you don't necessarily have to use underscores for migrations names?
Marian Pop πΊπ¦ Laravel Magazine
#scheduler #models #prunable
π‘#Laravel Eloquent Tip Laravel 8 introduced the Prunable trait. You can use it to delete old models on a scheduled basis. You don't need to write custom commands anymore:
Martin Joo
#faker #testing
π₯ Epic Laravel Tip: Did you know that you can generate not only text values but also images with Faker?
#requests
π΅οΈββοΈ In your Laravel apps, you might want to detect if a request has been made by a bot or crawler. It's super simple to do using the "jenssegers/agent" package. #laravel #php
Ash Allen π
#eloquent #relationships #eager loading
When eager loading relationships in Laravel, you can specify the columns you need directly in the `with` method β¨
#eloquent
Just learned about the Eloquent "value()" method from @amaelftah πͺ. Eloquent make things so easy. Seems like there's shortcuts hiding everywhere, I love it! π π€©
Steve Bauman π
#downloads #responses
π₯ #Laravel Tip: When you want to send the user a file that their browser natively supports e.g. an image or a PDF, send them a file response instead of a download. That way, the browser will display it for them.
Matt Kingshott