Webhook API

This commit is contained in:
James Cole
2021-03-07 12:13:22 +01:00
parent c4882231d1
commit ba163f82d1
19 changed files with 800 additions and 90 deletions

View File

@@ -128,11 +128,11 @@ class Webhook extends Model
public static function routeBinder(string $value): Webhook
{
if (auth()->check()) {
$budgetId = (int)$value;
$webhookId = (int)$value;
/** @var User $user */
$user = auth()->user();
/** @var Webhook $webhook */
$webhook = $user->webhooks()->find($budgetId);
$webhook = $user->webhooks()->find($webhookId);
if (null !== $webhook) {
return $webhook;
}