Junior Code Review: Laravel API Controller - 8 Tips for Improvement
In this video, I will go through one Laravel API Controller and suggest some improvements. Would you add anything else?
00:00 Intro
00:54 Reformat for Readability
02:16 Get Auth User ID
02:50 2 DB Queries into 1
04:07 Form Request validated
05:17 Variable Naming
05:53 If-else to Try-catch
07:05 Route Model Binding
08:09 Early Returns
Related video: Danger of Using $request-all(), and How to Protect
Playlist of more code reviews:
- - - - -
Support the channel by checking out my products:
- My Laravel courses membership:
- Laravel QuickAdminPanel:
- Livewire Kit Components:
- - - - -
Other places to follow:
- My weekly Laravel newsletter:
- My personal Twitter:
20 views
90
27
14 years ago 00:14:15 38
110825 Mnet Beatles Code - Super Junior (1/4)
4 years ago 00:17:29 17
Laravel Junior Code Review: Security and Consistency
14 years ago 00:13:43 12
110825 Mnet Beatles Code - Super Junior (2/4)
4 years ago 00:15:30 19
Laravel Junior Code Review: 12 Tips on Everything
4 years ago 00:17:58 20
Junior Code Review: Better Routes, CRUDs and Validation
4 years ago 00:19:57 45
Junior Code Review: Laravel Routes, Middleware, Validation and more
4 years ago 00:15:01 12
Junior Code Review: 13 Tips from Cryptocracy Project