koel/app/Exceptions/UserAlreadySubscribedToPodcast.php

16 lines
330 B
PHP
Raw Normal View History

2024-05-19 05:49:42 +00:00
<?php
namespace App\Exceptions;
use App\Models\Podcast;
2024-05-19 05:49:42 +00:00
use App\Models\User;
use Exception;
final class UserAlreadySubscribedToPodcast extends Exception
{
public static function make(User $user, Podcast $podcast): self
{
return new self("User $user->id has already subscribed to podcast $podcast->id");
}
}