I am curious whether you'd be open to the ability for Endpoints to support Invokable classes. Although by default Closures are support, it would be great if you could simplify code even more by pushing logic into a separate class. For instance:
public function endpoints(): array
{
return [
Endpoint\Index::make('outbox')
->action(Action\OutboxAction::class)
->route('GET', '/{id}/outbox')
];
}
Creating the respective Invokable class to another folder will clear out the Resource class definition, while still guaranteeing ease of tracing.
PS, amazing work Toby, been playing with this library these past few weeks and it's very much a welcome, fresh change to building an API server 👏
I am curious whether you'd be open to the ability for Endpoints to support Invokable classes. Although by default Closures are support, it would be great if you could simplify code even more by pushing logic into a separate class. For instance:
Creating the respective Invokable class to another folder will clear out the Resource class definition, while still guaranteeing ease of tracing.
PS, amazing work Toby, been playing with this library these past few weeks and it's very much a welcome, fresh change to building an API server 👏