Skip to content

Mohcin Bounouara

Thoughts about software engineering and life

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”