huddledigital / zendesk-laravel

Laravel wrapper for zendesk/zendesk_api_client_php package.
MIT License
104 stars 70 forks source link

feat: update NullService to catch property access #27

Closed jryd closed 1 year ago

jryd commented 1 year ago

In our implementation, we rely on access to returned data when creating tickets.

This breaks when doing something like:

$ticket = Zendesk::tickets()->create([...])->ticket;

By using __get() we can catch calls to properties and just continue to return the NullService as we do for methods.