4.4.0
Added
-
Support for
integer
column type for theartisan restify:stub
command. -
Support for managing related entities via Eager fields. For example, if you want to have in relationships an
BelongsTo
field:
//PostRepository.php
public static function getRelated()
{
return [
'owner' => BelongsTo::make('owner', 'owner', UserRepository::class),
];
}
Then you can get it via related as usual:
/api/restify/posts?related=owner
And the returned object in the relationships will be formatted using UserRepository fields, so you can attach policies and permissions for specific fields in the repository itself.