mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-07 07:43:12 +08:00
Added option to provide custom slug when creating a short url
This commit is contained in:
14
module/Core/src/Exception/NonUniqueSlugException.php
Normal file
14
module/Core/src/Exception/NonUniqueSlugException.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\Exception;
|
||||
|
||||
use Shlinkio\Shlink\Common\Exception\InvalidArgumentException;
|
||||
|
||||
class NonUniqueSlugException extends InvalidArgumentException
|
||||
{
|
||||
public static function fromSlug(string $slug): self
|
||||
{
|
||||
return new self(sprintf('Provided slug "%s" is not unique.', $slug));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user