Created
November 15, 2022 15:04
-
-
Save rmcdaniel/a50d7367c329110fad913b9a7dc25369 to your computer and use it in GitHub Desktop.
This file contains hidden or 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\Workflows\InvalidateCache; | |
use Illuminate\Support\Facades\Http; | |
use Workflow\Activity; | |
class InvalidateCacheActivity extends Activity | |
{ | |
public function execute($url) | |
{ | |
Http::withHeaders([ | |
'X-Client-key' => config('services.cloudimage.key'), | |
'Content-Type' => 'application/json' | |
])->post('https://api.cloudimage.com/invalidate', [ | |
'scope' => 'original', | |
'urls' => [ | |
'/' . $url | |
], | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment