Laravel Pro Tips
#requests #querystrings
A handy Laravel tip π₯ If for some reason, your URL is having query parameters, you can retrieve the URL without query parameters using the `fullUrlWithoutQuery` method of request like so. https://t.co/BVFTzaZs2H #Laravel #PHP
Amit Merchant
#events #factories
Laravel Tip: If you want to create multiple records using Factory without firing any Events, you can wrap your code inside a withoutEvents closure.
The Laravel Dev
#eloquent #timestamps
π #Laravel Tip | In some cases you don't want the updated_at field the change when updating small things. .. Did you know you could disable the timestamps while saving your data? Here is how... π₯ #laraveltip #php #code #development #details
Bert De Swaef
#schema #database
π Get all the column names for a table in #laravel
Aaron Lumsden π | Indie Hacker Dev
#migrations
#Laravel Tip π₯ : Now you can add the column in the database table only if its not present & can drop it if, its present. For that following methods are introduced: π whenTableDoesntHaveColumn π whenTableHasColumn Let's see example: #PHP #100devs #100DaysOfCode #webdeveloper
Mohammad Haris β‘
#jobs
π₯ #Laravel Unique Jobs Sometimes, you may want to ensure that only one instance of a specific job is on the queue at any point in time. You can do that by implementing the `ShouldBeUnique` interface in your job class.
Cosme Escobedo
#eloquent #memory
π₯ #Laravel Streaming Results Lazily You may know that you can make a query in chunks to avoid loading large amounts of data in memory. But you can also do that by using the lazy method, which lets you interact with the results as a single stream:
#mailables #email
π‘There's an alwaysTo helper on the Mail class in Laravel. It helps you to avoid accidental e-mail sends when developing.
Martin Joo
#collections
The every method may be used to verify that all elements of a collection pass a given truth test. #Laravel
Teacoders