diff options
Diffstat (limited to 'src/Attribute/Delete.php')
| -rw-r--r-- | src/Attribute/Delete.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Attribute/Delete.php b/src/Attribute/Delete.php new file mode 100644 index 0000000..4588f76 --- /dev/null +++ b/src/Attribute/Delete.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace BrettParson\MiniRoute\Attribute; + +use Attribute; + +#[Attribute(Attribute::TARGET_METHOD)] +final class Delete implements RouteAttribute +{ + public function __construct(public readonly string $path) + { + } + + public function method(): string + { + return 'DELETE'; + } + + public function path(): string + { + return $this->path; + } +} |
