8
🔥 Use the reset() method to reset properties to their original state in Livewire
#Laravel Livewire Tip:
If you want to remove property values at once and make your code cleaner, you can use $this->reset
method.
Here is an example:
🔥 This week's tips for Laravel developers
Lots of great tweets this week, thanks to everyone for posting them! They're helpful to everyone in the community ❤️
8
#Laravel Livewire Tip:
If you want to remove property values at once and make your code cleaner, you can use $this->reset
method.
Here is an example:
7
When using Jetstream Fortify, If you would like to take the user to a different page after registration instead of the email verifying page. Then you could add an array inside config/fortify.php
like shown below #Laravel
6
When using Laravel morphs, you can eek out some extra performance by using small integers instead of strings for your morph types.
Smaller, faster indexes for the database to manage!
Especially useful for tables like comments or audits, which can be many millions of rows.
5
Do you hate re-writing short closures just to add temporary debugging code?
4
If you ever need to generate text-based tables for sending in text messages, outputting in console, or in logs, @symfony provides an awesome "Table" class, just for that! 💅 Such a cool utility! 🤩
3
In the next blog posts, I'll cover Database and Eloquent improvements and new features in #Laravel 8.x.
Here's a great little feature that got added in v8.60 🔥
PR: https://github.com/laravel/framework/pull/38707
Yesterday's post about Collections: https://protone.media/en/blog/a-look-at-new-features-and-improvements-since-the-original-laravel-80-release-collections
#PHP #webdev #opensource
2
Did you know that you don't have to pass a function to Laravel's "where" method when using the Rule class?
1
#Laravel Tip: If you want a single value from a database table.
We're writing a book, you can get it for free here. We're writing a book! Join the early access to get it for free.