Laravel Transporter Version 2 #44
JustSteveKing
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Part of what I would like to do, is turn HTTP requests into something similar to Laravel Mailables, so that they are clean and nice to use - mirroring other forms of communication within the Laravel ecosystem. This would look something like the following: class FetchArticlesRequest
{
public function __construct() {} // Your raw request payload
public function content(): Content
{
return new Content();
}
public function method(): Method
{
return Method::GET;
}
public function headers(): array
{
return HeaderCollection:make([]);
}
}Then being able to send this in a familiar way: Transporter::to('request-url')->send(new FetchArticlesRequest()); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on Version 2 of Laravel Transporter and will likely introduce breaking changes. Part of this is going to be a balance between supporting the Version 1 way of using the package, and the other part is going to be how we can make this library better and more fun to use moving forwards.
I wanted to start a discussion about what people would like to see in Version 2 so that I can be guided by others who use this library over my goals.
Beta Was this translation helpful? Give feedback.
All reactions