RouteTrait
trait RouteTrait
Methods
$this
defaults(array $defaults)
Adds defaults.
$this
requirements(array $requirements)
Adds requirements.
$this
options(array $options)
Adds options.
$this
condition(string $condition)
Sets the condition.
$this
host(string $pattern)
Sets the pattern for the host.
$this
schemes(array $schemes)
Sets the schemes (e.g. 'https') this route is restricted to.
$this
methods(array $methods)
Sets the HTTP methods (e.g. 'POST') this route is restricted to.
$this
controller(callable|string $controller)
Adds the "_controller" entry to defaults.
Details
final $this
schemes(array $schemes)
Sets the schemes (e.g. 'https') this route is restricted to.
So an empty array means that any scheme is allowed.