Closed sandervanhooft closed 4 years ago
Inspiration (link):
/**
* Handle dynamic property calls.
*
* @param string $property
* @return mixed
*/
public function __get($property)
{
if (method_exists($this, $property)) {
return call_user_func([$this, $property]);
}
$message = '%s does not respond to the "%s" property or method.';
throw new Exception(
sprintf($message, static::class, $property)
);
}
✅ @jubeki worked his magic into this package.
It's now possible to use the same calls as in mollie/mollie-api-php
.
For clarity it's best to update the code samples in the documentation as well, to match Mollie's docs. @Jubeki would you be willing to take a stab at this? Otherwise I'll pick it up.
@vernondegoede could you modify the header image / provide a new one?
I don't have a source file for this.
Thanks for solving this issue @jubeki, much appreciated!
Expected Behavior
Laravel wrapper should behave the same as the Mollie core client. For example:
This way it's possible to use the same examples in the docs for both.
Current Behavior
Possible Solution
We could implement a magic getter function on the wrapper to proxy the endpoints.
This way,
would then become an alias for
Context
Consistency -> happy dev 😄