Skip to main content
CF

Writing Readable PHP

2h 40m 32s
English
Paid

Learn how to write code that’s a joy to read for you, your co-workers, and future self. View high-quality videos on both clean coding and static analysis.

Are you...

  • Staring at your old code as if someone else wrote it?
  • Coding in a team without clean code habits?
  • Struggling with consistent naming?
  • Stop the madness! Let’s learn how to write readable PHP in this hands-on course.

About the Author: Spatie

Spatie thumbnail

Spatie is a Belgian web-development agency and one of the most respected names in the Laravel ecosystem — the author of more than 350 open-source PHP / Laravel packages (Laravel Permission, Laravel Backup, Laravel Translatable, Laravel Image Optimizer, and many others) that anchor a substantial portion of working Laravel codebases. Spatie's paid course material extends the same depth into long-form video.

The CourseFlix listing carries two Spatie courses: Writing Readable PHP (the code-quality / readability discipline applied to modern PHP) and Testing Laravel with PHPUnit (the testing workflow for production Laravel applications).

Material is paid and aimed at PHP / Laravel developers ready to take code quality and testing as serious professional disciplines. For broader content, see CourseFlix's Laravel and PHP category pages.

Watch Online 23 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 23 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Automatically formatting code
All Course Lessons (23)
#Lesson TitleDurationAccess
1
Automatically formatting code Demo
06:01
2
FORMATTING CODE USING GITHUB ACTIONS
03:28
3
Be Expressive
08:58
4
Be Consistent
06:53
5
Replace booleans in models with timestamps
03:53
6
Avoid using else
06:31
7
Refactoring complex conditionals
10:51
8
Make sure boolean parameters are readable
05:41
9
Using custom exceptions
11:22
10
Skip optional parameters by using named arguments
04:38
11
Replace if blocks with match
04:01
12
Trying out PHPStan for the first time
07:34
13
Class strings
05:38
14
Arrays and collections
11:06
15
Generics
10:21
16
Ignoring PHPStan issues
02:53
17
Use multiple routes files
05:41
18
Use custom Eloquent collections
07:10
19
Avoid strings where possible
06:00
20
Use Laravel's more descriptive methods if given
07:25
21
Leverage form requests
10:27
22
Use macros to clean up code
06:02
23
Embrace factories
07:58
Unlock unlimited learning

Get instant access to all 22 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Books

Read Book Writing Readable PHP

#TitleTypeOpen
1Book 1 PDF
2Book 2 PDF
3Book 3 PDF
4Book 4 PDF
5Book 5 PDF
6Book 6 PDF
7Book 7 PDF
8Book 8 PDF
9Book 9 PDF
10Book 10 PDF
11Book 11 PDF
12Book 12 PDF
13Book 13 PDF
14Book 14 PDF
15Book 15 PDF
16Book 16 PDF
17Book 17 PDF
18Book 18 PDF
19Book 19 PDF
20Book 20 PDF
21Book 21 PDF
22Book 22 PDF
23Book 23 PDF
24Book 24 PDF
25Book 25 PDF
26Book 26 PDF
27Book 27 PDF
28Book 28 PDF
29Book 29 PDF
30Book 30 PDF
31Book 31 PDF
32Book 32 PDF
33Book 33 PDF
34Book 34 PDF
35Book 35 PDF
36Book 36 PDF
37Book 37 PDF
38Book 38 PDF
39Book 39 PDF
40Book 40 PDF
41Book 41 PDF
42Book 42 PDF
43Book 43 PDF
44Book 44 PDF
45Book 45 PDF
46Book 46 PDF
47Book 47 PDF
48Book 48 PDF
49Book 49 PDF
50Book 50 PDF
51Book 51 PDF
52Book 52 PDF
53Book 53 PDF
54Book 54 PDF
55Book 55 PDF
56Book 56 PDF
57Book 57 PDF
58Book 58 PDF
59Book 59 PDF
60Book 60 PDF
61Book 61 PDF
62Book 62 PDF
63Book 63 PDF
64Book 64 PDF
65Book 65 PDF

Related courses

Frequently asked questions

What are the prerequisites for enrolling in this course?
The course assumes a basic understanding of PHP and web development concepts. Familiarity with Laravel will be beneficial as some lessons involve Laravel-specific methods and features, such as Eloquent collections and form requests. No advanced expertise in PHP is required, but a general comfort with programming principles will help you get the most out of the content.
What will I build or achieve by the end of this course?
By the end of the course, you'll have improved your PHP code's readability and maintainability. You will learn to automatically format code, refactor complex conditionals, use custom exceptions, and leverage Laravel’s descriptive methods. The focus is on enhancing existing codebases to make them more expressive and consistent, rather than building a new application from scratch.
Who is the intended audience for this course?
This course is designed for PHP developers who want to improve the readability of their code. It's suitable for both junior developers looking to enhance their skills and experienced developers who wish to refine their coding practices. The course is particularly useful for those working in team environments where code readability and consistency are crucial.
What specific tools or platforms are covered in this course?
The course covers tools and techniques such as PHPStan for static analysis and GitHub Actions for automatic code formatting. It also explores Laravel-specific methods and features, such as custom Eloquent collections and form requests, which are used to improve code clarity and structure.
What topics are not covered in this course?
The course does not cover PHP basics or general programming concepts. It also does not delve into advanced PHP topics such as performance optimization, security practices, or full application development. The focus is strictly on writing clean, readable PHP code and leveraging specific tools for code analysis and formatting.
How much time should I expect to commit to this course?
Although the total runtime of the course videos is not specified, the course consists of 23 lessons. Students should expect to spend additional time practicing the techniques demonstrated, especially when applying them to their own codebases. A reasonable estimate would be several weeks of part-time study, depending on prior experience and learning pace.
How can skills from this course be applied in other areas or careers?
The skills learned in this course are applicable in any PHP development environment, enhancing code readability and maintainability. These practices can be beneficial in collaborative settings, improving team communication and reducing technical debt. The emphasis on clean coding and static analysis can be transferred to other programming languages and frameworks, broadening your skills in software craftsmanship.