Closed adzay closed 2 years ago
Hi, I'm sorry the docs are not clear about that. I will adjust them accordingly.
The createWebhook
can be called inside of a controller method for example.
Example 1:
class ExampleController extends Controller {
public function store()
{
Game::createWebhook(/* ... */);
}
}
Example 2: (directly inside a route)
Route::post('your-route', function() {
Game::createWebhook(/* ... */);
});
Just make sure you have done the initial configuration and have set up the route to handle incoming wenhooks.
I'm currently working on the next major version of this package which will have a huge improvement on how to work with webhooks (for example create them via the artisan CLI). Stay tuned 👍🏼
I hope I could help. If there are any unanswered questions feel free to ask and I will do my best to answer them. 💪🏼
Awesome, I see you have posted the update! looking forward to trying over the weekend (cant do it now).
Yeah, the new version is up and as already mentioned it contains a bunch of improvements for webhooks. The package also registers the necessary route itself now which makes it easier to start of with webhooks. 👍🏼
Just let me know what you think when you get your hands on the new version 🙂
I want to implement Webhooks but it is not clear where to place the below:
I put it in my web.php (routes file) but that resulted in the below error: