Skip to content

Commit

Permalink
fix subscription model static call
Browse files Browse the repository at this point in the history
  • Loading branch information
oza75 committed May 14, 2022
1 parent bd7ac4b commit a6ceb8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Commands/SubscribeUrlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Schema;
use Oza75\LaravelSesComplaints\LaravelSesComplaints;
use Oza75\LaravelSesComplaints\LaravelSesComplaintsFacade;
use Oza75\LaravelSesComplaints\LaravelSesComplaintsServiceProvider;
use Oza75\LaravelSesComplaints\Models\Subscription;

Expand All @@ -20,7 +21,7 @@ class SubscribeUrlCommand extends Command

public function handle(): int
{
$model = LaravelSesComplaints::subscriptionModel();
$model = LaravelSesComplaintsFacade::subscriptionModel();

if (!Schema::hasTable($model->getTable())) {
$this->error("You need run migration first !");
Expand All @@ -41,7 +42,7 @@ public function handle(): int
$subscription = $model->newQuery()->where('topic_arn', $topic)->latest()->first();

if (!$subscription) {
throw new \Error("no subscription confirmation request found for this topic !");
throw new \Error("no subscription confirmation request found for this topic !");
}

$this->info("SubscribeURL: " . $subscription->subscribe_url);
Expand Down

0 comments on commit a6ceb8f

Please sign in to comment.