generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from spatie/store-model
Add possibility the change how a WebookCall model is stored
- Loading branch information
Showing
9 changed files
with
53 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
<?php | ||
|
||
|
||
namespace Spatie\WebhookClient\Tests\TestClasses; | ||
|
||
|
||
use Illuminate\Http\Request; | ||
use Spatie\WebhookClient\SignatureValidator\SignatureValidator; | ||
use Spatie\WebhookClient\WebhookConfig; | ||
use Spatie\WebhookClient\SignatureValidator\SignatureValidator; | ||
|
||
class EverythingIsValidSignatureValidator implements SignatureValidator | ||
{ | ||
public function isValid(Request $request, WebhookConfig $config): bool | ||
{ | ||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
<?php | ||
|
||
|
||
namespace Spatie\WebhookClient\Tests\TestClasses; | ||
|
||
|
||
use Illuminate\Http\Request; | ||
use Spatie\WebhookClient\SignatureValidator\SignatureValidator; | ||
use Spatie\WebhookClient\WebhookConfig; | ||
use Spatie\WebhookClient\SignatureValidator\SignatureValidator; | ||
|
||
class NothingIsValidSignatureValidator implements SignatureValidator | ||
{ | ||
public function isValid(Request $request, WebhookConfig $config): bool | ||
{ | ||
return false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Spatie\WebhookClient\Tests\TestClasses; | ||
|
||
use Illuminate\Http\Request; | ||
use Spatie\WebhookClient\WebhookConfig; | ||
use Spatie\WebhookClient\Models\WebhookCall; | ||
|
||
class WebhookModelWithoutPayloadSaved extends WebhookCall | ||
{ | ||
public static function storeWebhook(WebhookConfig $config, Request $request): WebhookCall | ||
{ | ||
return WebhookCall::create([ | ||
'name' => $config->name, | ||
'payload' => [], | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters