Search

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