/
var
/
www
/
flurhymez
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Routing
/
/var/www/flurhymez/vendor/laravel/framework/src/Illuminate/Routing
mkdir
upload
Name
Size
Mode
Actions
Console/
-
0755
rm
Contracts/
-
0755
rm
Events/
-
0755
rm
Exceptions/
-
0755
rm
Matching/
-
0755
rm
Middleware/
-
0755
rm
AbstractRouteCollection.php
7950
0644
edit
dl
rm
CompiledRouteCollection.php
9145
0644
edit
dl
rm
composer.json
1465
0644
edit
dl
rm
Controller.php
1660
0644
edit
dl
rm
ControllerDispatcher.php
2309
0644
edit
dl
rm
ControllerMiddlewareOptions.php
1013
0644
edit
dl
rm
CreatesRegularExpressionRouteConstraints.php
1833
0644
edit
dl
rm
ImplicitRouteBinding.php
2804
0644
edit
dl
rm
LICENSE.md
1075
0644
edit
dl
rm
MiddlewareNameResolver.php
3178
0644
edit
dl
rm
PendingResourceRegistration.php
5788
0644
edit
dl
rm
Pipeline.php
1503
0644
edit
dl
rm
RedirectController.php
1208
0644
edit
dl
rm
Redirector.php
7396
0755
edit
dl
rm
ResourceRegistrar.php
14927
0644
edit
dl
rm
ResponseFactory.php
7768
0644
edit
dl
rm
Route.php
30241
0755
edit
dl
rm
RouteAction.php
3442
0644
edit
dl
rm
RouteBinding.php
2750
0644
edit
dl
rm
RouteCollection.php
7051
0644
edit
dl
rm
RouteCollectionInterface.php
2332
0644
edit
dl
rm
RouteDependencyResolverTrait.php
3470
0644
edit
dl
rm
RouteFileRegistrar.php
641
0644
edit
dl
rm
RouteGroup.php
2662
0644
edit
dl
rm
RouteParameterBinder.php
3118
0644
edit
dl
rm
Router.php
35578
0644
edit
dl
rm
RouteRegistrar.php
7402
0644
edit
dl
rm
RouteSignatureParameters.php
1457
0644
edit
dl
rm
RouteUri.php
1330
0644
edit
dl
rm
RouteUrlGenerator.php
9296
0644
edit
dl
rm
RoutingServiceProvider.php
6084
0755
edit
dl
rm
SortedMiddleware.php
3664
0644
edit
dl
rm
UrlGenerator.php
20442
0755
edit
dl
rm
ViewController.php
869
0644
edit
dl
rm
Edit:
/var/www/flurhymez/vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php
(7950B)
<?php namespace Illuminate\Routing; use ArrayIterator; use Countable; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Str; use IteratorAggregate; use LogicException; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper; use Symfony\Component\Routing\RouteCollection as SymfonyRouteCollection; abstract class AbstractRouteCollection implements Countable, IteratorAggregate, RouteCollectionInterface { /** * Handle the matched route. * * @param \Illuminate\Http\Request $request * @param \Illuminate\Routing\Route|null $route * @return \Illuminate\Routing\Route * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ protected function handleMatchedRoute(Request $request, $route) { if (! is_null($route)) { return $route->bind($request); } // If no route was found we will now check if a matching route is specified by // another HTTP verb. If it is we will need to throw a MethodNotAllowed and // inform the user agent of which HTTP verb it should use for this route. $others = $this->checkForAlternateVerbs($request); if (count($others) > 0) { return $this->getRouteForMethods($request, $others); } throw new NotFoundHttpException; } /** * Determine if any routes match on another HTTP verb. * * @param \Illuminate\Http\Request $request * @return array */ protected function checkForAlternateVerbs($request) { $methods = array_diff(Router::$verbs, [$request->getMethod()]); // Here we will spin through all verbs except for the current request verb and // check to see if any routes respond to them. If they do, we will return a // proper error response with the correct headers on the response string. return array_values(array_filter( $methods, function ($method) use ($request) { return ! is_null($this->matchAgainstRoutes($this->get($method), $request, false)); } )); } /** * Determine if a route in the array matches the request. * * @param \Illuminate\Routing\Route[] $routes * @param \Illuminate\Http\Request $request * @param bool $includingMethod * @return \Illuminate\Routing\Route|null */ protected function matchAgainstRoutes(array $routes, $request, $includingMethod = true) { [$fallbacks, $routes] = collect($routes)->partition(function ($route) { return $route->isFallback; }); return $routes->merge($fallbacks)->first(function (Route $route) use ($request, $includingMethod) { return $route->matches($request, $includingMethod); }); } /** * Get a route (if necessary) that responds when other available methods are present. * * @param \Illuminate\Http\Request $request * @param string[] $methods * @return \Illuminate\Routing\Route * * @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException */ protected function getRouteForMethods($request, array $methods) { if ($request->method() === 'OPTIONS') { return (new Route('OPTIONS', $request->path(), function () use ($methods) { return new Response('', 200, ['Allow' => implode(',', $methods)]); }))->bind($request); } $this->methodNotAllowed($methods, $request->method()); } /** * Throw a method not allowed HTTP exception. * * @param array $others * @param string $method * @return void * * @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException */ protected function methodNotAllowed(array $others, $method) { throw new MethodNotAllowedHttpException( $others, sprintf( 'The %s method is not supported for this route. Supported methods: %s.', $method, implode(', ', $others) ) ); } /** * Compile the routes for caching. * * @return array */ public function compile() { $compiled = $this->dumper()->getCompiledRoutes(); $attributes = []; foreach ($this->getRoutes() as $route) { $attributes[$route->getName()] = [ 'methods' => $route->methods(), 'uri' => $route->uri(), 'action' => $route->getAction(), 'fallback' => $route->isFallback, 'defaults' => $route->defaults, 'wheres' => $route->wheres, 'bindingFields' => $route->bindingFields(), 'lockSeconds' => $route->locksFor(), 'waitSeconds' => $route->waitsFor(), 'withTrashed' => $route->allowsTrashedBindings(), ]; } return compact('compiled', 'attributes'); } /** * Return the CompiledUrlMatcherDumper instance for the route collection. * * @return \Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper */ public function dumper() { return new CompiledUrlMatcherDumper($this->toSymfonyRouteCollection()); } /** * Convert the collection to a Symfony RouteCollection instance. * * @return \Symfony\Component\Routing\RouteCollection */ public function toSymfonyRouteCollection() { $symfonyRoutes = new SymfonyRouteCollection; $routes = $this->getRoutes(); foreach ($routes as $route) { if (! $route->isFallback) { $symfonyRoutes = $this->addToSymfonyRoutesCollection($symfonyRoutes, $route); } } foreach ($routes as $route) { if ($route->isFallback) { $symfonyRoutes = $this->addToSymfonyRoutesCollection($symfonyRoutes, $route); } } return $symfonyRoutes; } /** * Add a route to the SymfonyRouteCollection instance. * * @param \Symfony\Component\Routing\RouteCollection $symfonyRoutes * @param \Illuminate\Routing\Route $route * @return \Symfony\Component\Routing\RouteCollection * * @throws \LogicException */ protected function addToSymfonyRoutesCollection(SymfonyRouteCollection $symfonyRoutes, Route $route) { $name = $route->getName(); if ( ! is_null($name) && Str::endsWith($name, '.') && ! is_null($symfonyRoutes->get($name)) ) { $name = null; } if (! $name) { $route->name($name = $this->generateRouteName()); $this->add($route); } elseif (! is_null($symfonyRoutes->get($name))) { throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}]."); } $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute()); return $symfonyRoutes; } /** * Get a randomly generated route name. * * @return string */ protected function generateRouteName() { return 'generated::'.Str::random(); } /** * Get an iterator for the items. * * @return \ArrayIterator */ #[\ReturnTypeWillChange] public function getIterator() { return new ArrayIterator($this->getRoutes()); } /** * Count the number of items in the collection. * * @return int */ #[\ReturnTypeWillChange] public function count() { return count($this->getRoutes()); } }
Save
cmd:
run