Skip to content

Mohcin Bounouara

Thoughts about software engineering and life

Fixing Laravel Route Conflicts, that led to 404 Errors for Existing Routes

Problem: Recently, while developing a feature to update resources in my Laravel app, I faced an unexpected issue: the create functionality, which had been working previously, suddenly stopped functioning. When I tried accessing the jobs/create route, it led to a 404 page, even though my unit tests confirmed that the route existed and the functionality Continue reading “Fixing Laravel Route Conflicts, that led to 404 Errors for Existing Routes”

Understanding Method Spoofing in Laravel

Title: Understanding Method Spoofing in Laravel When working with request/response methods, different HTTP methods like GET, POST, PUT, and PATCH have custom purposes. POST is generally used for creating resources, while PUT and PATCH are intended for updates. But as a developer, you’ll often see POST used for updates too. This happens due to browser Continue reading “Understanding Method Spoofing in Laravel”

Delegation Skills Is a Must In Software Development

In the field of software development, mastering delegation is a must. I’ve always known this from learning and practicing in real-life work scenarios, as well as from various web conferences and podcasts discussing the importance of delegation. However, it wasn’t until today that I fully know its significance. Without delegation, you may experience the following: Continue reading “Delegation Skills Is a Must In Software Development”

Handling Multiple Forms with Different Field Names Using a Single Endpoint

The Problem: Suppose you have an endpoint to send data to the database, and in your project, you have two forms with the same field(s), let’s say a field named “name”. How can you manage this without creating redundant and complex code? The Initial Solution: A quick solution might be to create two separate forms Continue reading “Handling Multiple Forms with Different Field Names Using a Single Endpoint”

You can rely on existing solutions

I used to believe that building everything from scratch was the mark of a good developer. However, I understand later that this mindset reflects a lack of experience and problem-solving skills. In the real world, developers often rely on prebuilt solutions rather than creating everything themselves. While we might not always understand the inner workings Continue reading “You can rely on existing solutions”

A Quick Guide to Creating Laravel Factories and Seeders

I often find myself back to the Laravel documentation whenever I need to create new factories and seeders for my projects, whether they’re learning exercises, hobby projects, or real-world applications (bored doing the same actions every time). To make this process easy, I’ve decided to create a guide that I can refer to whenever needed, Continue reading “A Quick Guide to Creating Laravel Factories and Seeders”