api-platform/schema-generator
CLI tool from API Platform that generates PHP class models from vocabularies like Schema.org and ActivityStreams, or from OpenAPI specs. Quickly scaffold types and properties into a ready-to-use PHP codebase for APIs and domain models.
doctrine/orm alongside Eloquent).[ApiResource], [ApiProperty]) and security annotations, which are directly usable in API Platform. For Laravel, this would require API Platform’s Laravel adapter or manual attribute mapping (e.g., via api-platform/core + nelmio/api-doc-bundle).doctrine/dbal + custom traits).#[Column] → protected $attribute).api-platform/core + symfony/ux-live-component for hybrid setups).#[Column] vs. #[ORM\Column]). Risk: Generated classes may need post-processing (e.g., via php-cs-fixer or custom scripts).#[ApiResource]) are Symfony-specific; Laravel would need polyfills or alternative annotations (e.g., #[AsApiResource] via custom packages).generate --types="Person,Product").zircote/swagger-php or spatie/laravel-openapi.#[ORM\ManyToOne]) map to Eloquent? Will a custom trait or model generator bridge the gap?filp/whoops for API docs or darkaonline/l5-swagger for OpenAPI.#[UniqueRule] or #[HasMany])? If so, factor in CI/CD steps for post-generation fixes.| Component | Fit Level | Notes |
|---|---|---|
| Laravel Eloquent | Medium | Doctrine attributes require mapping (e.g., #[ORM\Column] → protected $field). |
| Symfony API Platform | High | Native support for #[ApiResource], #[ApiProperty], etc. |
| OpenAPI/Swagger | High | Direct OpenAPI input support; generated classes can be used with darkaonline/l5-swagger. |
| Schema.org/ActivityStreams | High | Core functionality aligns perfectly. |
| Custom Vocabularies | Medium | Requires OWL/XML Schema input; validation may be needed. |
| Laravel Fortify/Passport | Low | No direct integration; would need manual attribute mapping (e.g., #[ApiProperty(security="is_granted('auth')")]). |
Person, Product) from Schema.org/OpenAPI.#[ORM\Column] → protected $name).HasSchemaProperties).vendor/bin/schema generate --types="Person" --output="app/Models/Schema" --config="config/schema.yaml"
api-platform/core (Symfony bundle) + spatie/laravel-symfony-support for Symfony interop.darkaonline/l5-swagger for Laravel.#[HasFactory] in generated models).doctrine/dbal or doctrine/orm alongside Eloquent (not natively supported).l5-swagger for Laravel API docs.#[ApiProperty(security="is_granted('auth')")]).Product/Event).config/schema.yaml to customize:
App\Models\Schema).vendor/bin/schema generate with target types/config.#[UniqueRule], #[HasMany]).spatie/laravel-symfony-support).composer install).How can I help you explore Laravel packages today?