Testing

EloquentTesting

Mastering Data Modification in Laravel Queries: How to Add New Fields to Query Results

As senior developers working with the Laravel ecosystem, we constantly face scenarios where we need to fetch data and then enrich it. A common task is adding...

18 October 2026 · Stefan Bogdanescu
TestingConfiguration

PHPStorm exclude Tests from coverage percentage

Configuring PHPStorm for Code Coverage Exclusion

18 October 2026 · Stefan Bogdanescu
QueuesTesting

Running Laravel Jobs Asynchronously in PHPUnit: Solving the Sync/Async Testing Dilemma

As developers working with modern web applications built on Laravel, managing background jobs is crucial. The ability to dispatch tasks asynchronously—where...

17 October 2026 · Stefan Bogdanescu
ErrorsTesting

Mastering Data Structure: How to Convert Two-Dimensional Arrays to Laravel Collections

As developers working within the Laravel ecosystem, we spend a significant amount of time manipulating data. We often start with native PHP arrays, but for...

17 October 2026 · Stefan Bogdanescu
TestingComposer

Laravel: How to Mock a Class – Mastering Dependency Injection Testing

Are you running into confusion about mocking classes within the context of Laravel testing? You are definitely not alone. Many developers find that the...

17 October 2026 · Stefan Bogdanescu
EloquentBlade

How to Use Model Functions from the View: A Deep Dive into Laravel Eloquent

As a senior developer, I frequently encounter questions regarding the separation of concerns in MVC frameworks like Laravel. The confusion you are...

16 October 2026 · Stefan Bogdanescu
TestingEmail

Mastering Email Testing in Laravel: Beyond Simple Logging

When building complex applications, side effects like sending emails are critical components. You need assurance that when a user signs up or places an order...

16 October 2026 · Stefan Bogdanescu
TestingDatabase

Laravel Unit Testing: How to "See In Database" Soft Deleted Rows Correctly

As senior developers, we often find ourselves wrestling with the intricacies of testing database states, especially when dealing with Eloquent features like...

16 October 2026 · Stefan Bogdanescu
TestingAPI

Laravel - POST data is null when using external requests: Bridging the Gap Between Tests and Live APIs

As a senior developer, I’ve seen countless developers—from beginners to seasoned pros—stumble over seemingly simple inconsistencies when moving from local...

15 October 2026 · Stefan Bogdanescu
APIPerformance

Mastering JSON Output Formatting in Laravel: From Compact to Pretty

As developers working with APIs, one of the most common friction points is the difference between functionally correct data transmission and aesthetically...

15 October 2026 · Stefan Bogdanescu
ConfigurationErrors

Solving the Memory Exhaustion Nightmare: PHPUnit Failures After a Laravel/PHP Upgrade

Upgrading a complex application environment, especially when moving between major PHP versions and framework releases, often introduces subtle...

15 October 2026 · Stefan Bogdanescu
EloquentPerformance

Mastering Nested Eager Loading in Laravel: Taming the Multi-Level with() Function

As senior developers working with Eloquent, we frequently deal with complex data structures involving multiple levels of relationships. Retrieving deeply...

15 October 2026 · Stefan Bogdanescu
RoutingTesting

Debugging Authentication Middleware in Laravel Tests: Solving the RouteNotFoundException

As senior developers working with Laravel, testing authentication flows is a frequent source of confusion. When dealing with middleware like auth and feature...

15 October 2026 · Stefan Bogdanescu
TestingComposer

How to Pass Arguments to a Mocked Class Constructor: Mastering Dependency Setup

As developers, mocking is an essential tool for isolating units of code and testing complex interactions. However, when dealing with classes that rely on...

15 October 2026 · Stefan Bogdanescu
ErrorsConfiguration

Mastering Date Formatting in Laravel Carbon: Getting Three-Letter Month Abbreviations

As developers working with modern PHP frameworks like Laravel, we frequently deal with date and time manipulation. Carbon, the powerful date library built on...

15 October 2026 · Stefan Bogdanescu
DatabaseErrors

Decoding the Error: Fixing the Laravel Database Binding Issue

As senior developers working with the Laravel framework, we often encounter errors that seem cryptic but reveal fundamental misunderstandings about how the...

13 October 2026 · Stefan Bogdanescu
EloquentTesting

Mastering Relationship Filtering in Laravel: A Deep Dive with Eloquent

As a senior developer working with the Laravel ecosystem, one of the most common yet conceptually tricky tasks we face is filtering data that resides within...

12 October 2026 · Stefan Bogdanescu
ConfigurationQueues

Debugging Laravel Events: Why Your Pusher Broadcast Isn't Reaching the Channel

As a senior developer, I frequently encounter situations where application logic seems correct, but the expected communication channel—in this case...

11 October 2026 · Stefan Bogdanescu
EloquentPerformance

Mastering Eager Loading: Retrieving Only the Latest Related Record in Laravel

As developers working with Eloquent relationships, one of the most common challenges we face is not just loading related data, but loading specific subsets...

11 October 2026 · Stefan Bogdanescu
DatabaseMigrations

How to Generate Random Strings with Custom Lengths using Laravel Faker

As developers working within the Laravel ecosystem, we frequently rely on the powerful data-fication capabilities provided by Laravel Faker to populate our...

11 October 2026 · Stefan Bogdanescu
TestingBlade

Laravel Table Display Fix: How to List All Users Correctly in a Blade View

As a senior developer working with the Laravel ecosystem, I frequently encounter situations where data loops execute correctly from a backend perspective...

10 October 2026 · Stefan Bogdanescu
TestingErrors

Solving the Mystery: Call to undefined method ExampleTest::assertStatus() in Lumen Testing

As a developer diving into unit and feature testing, one of the most common hurdles is grappling with framework-specific testing syntax. You are building an...

10 October 2026 · Stefan Bogdanescu
ErrorsAPI

Moving Beyond cURL: Converting Raw Requests to the Laravel HTTP Client

As senior developers, we often encounter legacy codebases or external APIs that rely on raw cURL calls. While cURL offers unparalleled low-level control over...

9 October 2026 · Stefan Bogdanescu
AuthenticationErrors

Decoding the Static Analysis Dilemma: Solving the "Undefined Method 'hasRole'" Error in Laravel

As senior developers, we often encounter a strange paradox: our code runs perfectly fine during execution, yet our static analysis tools—our IDEs and...

9 October 2026 · Stefan Bogdanescu

Our network