Laravel تدافعی
Defensive Laravel
In this series, we'll take a deep-dive into various strategies and tools that will help you write robust and reliable code. We'll explore core defensive programming concepts, from strict typing and immutable objects to leveraging value objects for more effective domain modeling. Okay, let's dig in!
قسمتهای دوره
Defensive Programming Basics (3)
آشنایی با برنامهنویسی تدافعی
1m 25sLearn defensive programming fundamentals to build more robust, reliable PHP apps, practical techniques to prevent bugs and handle errors.
تایپ سختگیرانه
6m 24sEnable PHP strict typing to stop type-juggling surprises—learn how a single switch prevents bugs and makes your code safer.
شرطهای نگهبان و اجتناب از وضعیت نامعتبر
6m 39sUse guard clauses to fail fast, prevent invalid state, and simplify logic—learn practical patterns to make your PHP safer and clearer.
Embracing Immutability (4)
تاریخهای تغییرناپذیر
9m 40sUse immutable date objects to avoid bugs from mutable DateTime - learn practical patterns for safer, predictable date handling in PHP.
اشیاء به عنوان ساختارهای شبه
15m 46sUse lightweight, behaviorless objects as safe, self-documenting structs—learn how to model data cleanly and reduce bugs in PHP.
اشیاء غنی و کیسههای داده
14m 45sEvolve lightweight structs into rich objects: learn when to add rules, behavior, and validation for clearer, more maintainable PHP models.
نوشتن اشیاء تغییرناپذیر خودمان
12m 1sBuild your own immutable PHP objects to write cleaner, safer code—learn patterns, constructors, and benefits in a friendly Laracasts lesson.
Power of Value Objects (3)
اشیای مقداری
11m 52sDiscover how value objects help you model your domain effectively, making your PHP code clearer, safer, and easier to maintain.
همکاری بین اشیای مقداری
9m 10sExplore how value objects interact to build powerful, clear abstractions that enhance your PHP domain modeling and code quality.
اشیای مقداری با Eloquent
15m 1sLearn how to seamlessly integrate value objects with Eloquent models to write cleaner, more expressive, and maintainable Laravel code.
Static Analysis With PHPStan (4)
Phpstan: یک مقدمه
14m 55sLearn PHPStan static analysis: set it up in minutes, catch and fix your first PHP errors with a friendly, step-by-step Laracasts tutorial.
Phpstan: جنریکها و رشتههای کلاس
8m 44sMaster PHPStan generics and class strings to boost type safety and code quality with clear, practical examples in this friendly deep dive.
Phpstan: موارد لبه، جنریکهای چندنوعی و بیشتر
13m 15sMaster PHPStan edge cases, multi-type generics, and advanced tips to improve type safety, catch subtle bugs, and write clearer code.
Phpstan: ادغام با Laravel
14m 44sInstall Larastan so PHPStan understands your Laravel app, catch bugs early, boost type safety, and leverage its useful features.
Domain Design Tools (2)
ناورداهای دامنه و قوانین کسبوکار
13m 53sEncode business rules as domain invariants to enforce constraints, prevent bugs, and keep core logic explicit across your app.
بازنویسی خودکار با Rector
11m 23sSet up Rector for automated PHP refactoring: apply best practices, modernize code, and boost maintainability with minimal effort.
Automation and CI (2)
یکپارچهسازی پیوسته با Github Actions
5m 22sAutomate tests, PHPStan, and Rector with GitHub Actions—set up CI to run on every push, catch regressions early, and keep code healthy.
افکار پایانی
2m 12sWrap up the series with a clear recap of core fundamentals, practical advice on when to apply them, and tips to confidently use your new skills.




