FiltersControllerMiddleware.php
TLDR
This file contains a trait named FiltersControllerMiddleware
with a single method called methodExcludedByOptions
. This method is used to determine if a given method should be excluded based on specified options.
Methods
methodExcludedByOptions
This method takes two parameters: $method
(string) and $options
(array). It checks if the specified method should be excluded based on the options provided. It returns a boolean value indicating whether the method should be excluded or not.
Classes
<?php
namespace Illuminate\Routing;
trait FiltersControllerMiddleware
{
/**
* Determine if the given options exclude a particular method.
*
* @param string $method
* @param array $options
* @return bool
*/
public static function methodExcludedByOptions($method, array $options)
{
return (isset($options['only']) && ! in_array($method, (array) $options['only'])) ||
(! empty($options['except']) && in_array($method, (array) $options['except']));
}
}