Skip to main content

Search Results for "json"

We found 10 results for "json".

Tutorial 5 min read Free

Laravel Custom Fields: JSON, EAV Model, or Same Table?

There are situations when we're not sure what the columns of the DB table would be, they need to be flexible. For example, e-shop product properties: size, color, fabric, there may be more in the future. What is the best DB structure? I will show you 3 options and their performance.

Package 2378 stars Last updated November 2025

spatie/laravel-translatable

This package contains a trait to make Eloquent models translatable. Translations are stored as json. There is no extra table needed to hold them.

Tutorial 2 min read Free

Laravel API 404 Response: Return JSON Instead of Webpage Error

If you're building a Laravel project with both Web and API sides, you need to customize error messages for each of them separately. In web-view there should be error pages, and API exceptions should return JSON with status codes. How to handle it? I will show you an example with case of Model Not Found 404.