Generate PHP classes from JSON data structures
Enter JSON data to generate PHP code
Classes with getters and setters
The generator creates PHP classes with type hints (PHP 7.4+), getters/setters, constructors, and supports various frameworks like Laravel Eloquent models and plain PHP classes.
Yes! Select 'Laravel' as the framework to generate Eloquent model classes that extend the base Model class with proper imports and Laravel conventions.
You can specify a custom namespace in the options. The generator will add the appropriate namespace declaration at the top of the generated PHP file.
The generator uses modern PHP type hints for method parameters and return types, supporting bool, int, float, string, and array types based on your JSON data.