middleware = $middleware; } /** * Specify the only controller methods the middleware should apply to. * * @param array|string $only * @return $this */ public function only(array|string $only) { $this->only = Arr::wrap($only); return $this; } /** * Specify the controller methods the middleware should not apply to. * * @param array|string $only * @return $this */ public function except(array|string $except) { $this->except = Arr::wrap($except); return $this; } }