Рет қаралды 6,454
This is a code review of a Livewire component, which is actually optimization of the PHP class. Will you join me?
00:00 Introducing Component
01:31 Code Overview
03:01 Undefined Class Properties
03:51 Dynamic Class Names
05:45 Unnecessary Variable/Query
07:30 Formatting the Code
07:47 Config Default Values
09:15 Public or Private Methods
10:40 Wait, THAT many DB Queries??
15:17 Remove Duplicate Methods
15:57 Eloquent create() vs save()
17:07 Remove Even More Methods
Related links:
- Laravel and PHP Try-Catch: Exceptions VS Errors? • Laravel and PHP Try-Ca...
- My Course "Practical Laravel Livewire from Scratch" laraveldaily.teachable.com/p/...
- My Livewire Kit: Set of Components livewirekit.com/
- - - - -
Support the channel by checking out our products:
- Enroll in my Laravel courses: laraveldaily.teachable.com
- Try our Laravel QuickAdminPanel: bit.ly/quickadminpanel
- Purchase my Livewire Kit: livewirekit.com
- View Laravel Code Examples: laravelexamples.com
- Subscribe to my weekly newsletter: bit.ly/laravel-newsletter