Junior Code Review: 13 Tips from Cryptocracy Project

テクノロジー



Another review of a code submitted by one of you in the audience, with a lot of topics to cover.

00:00 Intro
01:11 Naming Things Properly
02:09 Route Grouping
03:33 “Special” Route with dd()
04:37 Global Middleware with Redirect
05:23 This Should NOT Be in Controller
06:45 “Cool” Laravel Collections
08:07 Too “Fat” Model?
09:23 Config Helper
09:48 Don’t Use $request-all()
10:22 Shorter Way to Create DB Record
11:25 No Extra Variables/Methods
12:29 Ternary Operator or If-Else
13:26 Eloquent firstOrCreate

Related links:
– Project Repository: https://github.com/dotangad/cryptocracy-v2
– Intro to Inertia.js with Laravel Breeze Example https://www.youtube.com/watch?v=jadX8xaR6tY
– Danger of Using $request-all(), and How to Protect https://www.youtube.com/watch?v=QQS5oEOguRU

– – – – –
Support the channel by checking out our products:
– Enroll in my Laravel courses: https://laraveldaily.teachable.com
– Try our Laravel QuickAdminPanel: https://bit.ly/quickadminpanel
– Purchase my Livewire Kit: https://livewirekit.com
– View Laravel Code Examples: https://laravelexamples.com
– Subscribe to my weekly newsletter: http://bit.ly/laravel-newsletter

Comments

Copied title and URL