mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-01 21:29:32 +00:00
20 lines
460 B
PHP
20 lines
460 B
PHP
<?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]);
|
|
}
|
|
} |