Posts List

Should an AJAX Controller Be Put in the API Route Group?

If your Laravel app is “full stack” and rendered with Blade views, but you have a few controller actions called only by Javascript, should those controllers go in the api route group or should they stay in the web route group?

Choosing a Status Code for an Expired Record

In a previous post, I discussed some thoughts around choosing the right HTTP status code. In today’s post, I’ll tackle a different scenario, and my reasoning behind the particular status code I ended up using.

Using Logs to Debug a Laravel API

On a recent project, we were building a Laravel API to be consumed by a mobile app being built by a separate team. When an end user reported an issue, one of the first questions was “Is this bug in the API or the mobile app?” In this post, I’ll share a logging strategy we used to help us quickly get to the root cause of the problem.

Choosing the Right HTTP Status Code

Do you ever get frustrated when you call an API and it sends back an inappropriate HTTP status code? I never want my APIs to be a source of frustation, so I’ll share a recent debate I had with myself as to which status code was the best.