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
name: Unit Test | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ master, develop ] | |
jobs: | |
unit-test: |
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
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Console\ConfirmableTrait; | |
use Illuminate\Encryption\Encrypter; | |
class KeyGenerateCommand extends Command | |
{ |
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
name: Unit Test | |
on: | |
push: | |
branches: [develop] | |
pull_request: | |
branches: [master, develop] | |
jobs: | |
PHPUnit: |
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
# create prepend sql commands | |
echo "set autocommit=0;set unique_checks=0;set foreign_key_checks=0;" > prepend.sql | |
# prepend huge.sql above commands | |
cat huge.sql >> prepend.sql | |
# create append sql commands | |
echo "set autocommit=1;set unique_checks=1;set foreign_key_checks=1;" > append.sql | |
# prepend huge.sql with append.sql |
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
### References | |
# https://openapi-generator.tech/docs/generators | |
# https://openapi-generator.tech/docs/usage#examples | |
# Generate the PHP SDK for Pet Store API | |
$ openapi-generator generate -g php -o /path/to/sdk/php -i /path/to/petstore.yaml | |
# Generate the Java SDK for Pet Store API | |
$ openapi-generator generate -g java -o /path/to/sdk/java -i /path/to/petstore.yaml |
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
swagger: "2.0" | |
info: | |
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters." | |
version: "1.0.0" | |
title: "Swagger Petstore" | |
termsOfService: "http://swagger.io/terms/" | |
contact: | |
email: "apiteam@swagger.io" | |
license: | |
name: "Apache 2.0" |
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
<?php | |
namespace App\WebhookClient\Transformers; | |
use App\Contracts\WebhookPayload as Payload; | |
class MicrosoftTeam | |
{ | |
public static function transform(Payload $payload): array | |
{ |
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
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
class CreateWebhookCallsTable extends Migration | |
{ | |
public function up() | |
{ | |
Schema::create('webhook_calls', function (Blueprint $table) { |
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
<?php | |
namespace App\Models; | |
use App\Traits\HasMediaExtended as MediaTrait; | |
use CleaniqueCoders\LaravelUuid\Contracts\HasUuid as HasUuidContract; | |
use CleaniqueCoders\LaravelUuid\Traits\HasUuid; | |
use Illuminate\Http\Request; | |
use OwenIt\Auditing\Auditable as AuditableTrait; | |
use OwenIt\Auditing\Contracts\Auditable as AuditableContract; |
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
<?php | |
namespace App\WebhookClient\SignatureValidator; | |
use Illuminate\Http\Request; | |
use Illuminate\Validation\UnauthorizedException; | |
use Spatie\WebhookClient\SignatureValidator\SignatureValidator; | |
use Spatie\WebhookClient\WebhookConfig; | |
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; |