Latest Premium Tutorial
-
· 14 mins, 2696 words · premium
Laravel Validation: Stock/Price Change with or without Livewire
What if your customer is filling in the order form, and meanwhile the product price has changed? Or, some product becomes out of stock? We need to re-validate the quantities/prices after the submit, right? In this article, I will show you two ways: regular Laravel and more UX-friendly "live validation" with Livewire.
Newest content
-
· 3 mins, 512 words
How to Seed More Data When Laravel Project is Live
-
· 2 mins, 293 words
Laravel Multi-Language: Show Translated Texts in Blade
-
Random Quick Laravel Tip:
Sub-selects in Laravel WayFrom Laravel 6, you can use addSelect() in Eloquent statement, and do some calculation to that added column.
1return Destination::addSelect(['last_flight' => Flight::select('name')2 ->whereColumn('destination_id', 'destinations.id')3 ->orderBy('arrived_at', 'desc')4 ->limit(1)5])->get(); -
· 5 mins, 828 words
Laravel Custom Fields: JSON, EAV Model, or Same Table?
-
· 2 mins, 344 words
Laravel Many-to-many Pivot Table: Add Extra Column with Relation
-
· 2 mins, 285 words
How to Change Redirect After Login/Register in Laravel Breeze
-
Premium Course: Build Laravel API for Car Parking App: Step-By-Step
-
· 1 min, 175 words
How to Deploy CSS/JS Assets with Vite to Live Server in Laravel
-
· 1 min, 125 words
How to name a pivot table in many-to-many in Laravel
-
· 3 mins, 535 words
Laravel Polymorphic Many-To-Many: Get All Related Records
-
· 4 mins, 706 words
Laravel Relation "Attempt to read property on null" Error: 4 Possible Solutions
-
· 2 mins, 232 words
Mutable Carbon Dates Errors: Use copy() or CarbonImmutable