Search

Programming
Programming

We provide developers and engineers the guides and tutorials they...

Content
Content

Content is king. It's not just about how you're going to write, b...

Events
Events

Looking for an engaging connection with thousands of other people...

All tools
Laravel & PHP

JSON to PHP Array Converter

Convert JSON into PHP short-array syntax and a starter Eloquent model with fillable attributes and inferred casts.

Examples

  • User object.
  • Nested meta.
  • List of rows.

How it works

Paste JSON from an API and copy a PHP array that uses [] syntax. The Eloquent stub takes top-level keys as $fillable and infers integer, float, boolean, array, and datetime casts. Nested objects stay as arrays so you can decide which relations to extract.

Related tools

Related reading

Your experience on this site will be improved by allowing cookies Cookie Policy