mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-03 06:09:31 +00:00
refactor code
This commit is contained in:
1 parent
c641ec725d
commit
25248e7822
37 files changed
+180
-143
No files matched your search
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Anikeen\Id\Http\Middleware;
|
||||
|
||||
abstract class UseParameters
|
||||
{
|
||||
/**
|
||||
* Specify the parameters for the middleware.
|
||||
*
|
||||
* @param string[]|string $param
|
||||
*/
|
||||
public static function using(array|string $param, string ...$params): string
|
||||
{
|
||||
if (is_array($param)) {
|
||||
return static::class . ':' . implode(',', $param);
|
||||
}
|
||||
|
||||
return static::class . ':' . implode(',', [$param, ...$params]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user