core icon indicating copy to clipboard operation
core copied to clipboard

Add Eloquent `apiProperties`

Open soyuka opened this issue 2 years ago • 0 comments

Description
We want to add ApiProperty to Eloquent models. To do so (inspired by https://github.com/api-platform/core/pull/4197) we will add a protected $apiProperties on an Eloquent Model:

class Book extends Model {
    protected $apiProperties = ['name' => new ApiProperty(...)];
}

These need to be read by the Laravel specific PropertyMetadataFactories.

https://github.com/api-platform/core/pull/5882

soyuka avatar Oct 16 '23 09:10 soyuka