In software development, there are two important concepts: synchronous and asynchronous behavior. JavaScript developers, especially those who use vanilla JavaScript, know these well because of how promises work. I like to explain things in a simple way, so it’s easier for me and others to understand new topics. Synchronous Programming Let’s imagine you went to Continue reading “Synchronous and Asynchronous code by simple examples”
Tag Archives: Backend Development
Fixing Object Pagination with Laravel and Inertia.js that gives empty data
Problem When working with Laravel and Inertia.js, pagination returns an object instead of an array. This can make looping over the results a bit tricky, as the expected array structure isn’t accessible. For example, in a typical Laravel controller method like this: You might see the data coming through correctly as a prop in your Continue reading “Fixing Object Pagination with Laravel and Inertia.js that gives empty data”
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”
Understanding Factory Design Patterns in PHP
It is a solution created by software engineers during the last years to solve those main problems particularly..
Advanced Dependency Injection in PHP
Dependency Injection is a technique (Design Pattern = Which mean its a common solution to a common problem in software development design) that allow use to create a code It helps to create loosely coupled code, making it easier to manage, test, and maintain.