Primo Committ
This commit is contained in:
50
vendor/laravel/framework/src/Illuminate/Routing/ControllerMiddlewareOptions.php
vendored
Normal file
50
vendor/laravel/framework/src/Illuminate/Routing/ControllerMiddlewareOptions.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Routing;
|
||||
|
||||
class ControllerMiddlewareOptions
|
||||
{
|
||||
/**
|
||||
* The middleware options.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $options;
|
||||
|
||||
/**
|
||||
* Create a new middleware option instance.
|
||||
*
|
||||
* @param array $options
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(array &$options)
|
||||
{
|
||||
$this->options = &$options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the controller methods the middleware should apply to.
|
||||
*
|
||||
* @param array|string|dynamic $methods
|
||||
* @return $this
|
||||
*/
|
||||
public function only($methods)
|
||||
{
|
||||
$this->options['only'] = is_array($methods) ? $methods : func_get_args();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the controller methods the middleware should exclude.
|
||||
*
|
||||
* @param array|string|dynamic $methods
|
||||
* @return $this
|
||||
*/
|
||||
public function except($methods)
|
||||
{
|
||||
$this->options['except'] = is_array($methods) ? $methods : func_get_args();
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user