File Manager Lite
Dir:
/home/codewavebd/public_html/vendor/laravel/framework/src/Illuminate/Routing
Upload
[..]
Attributes/
Rename
Del
CallableDispatcher.php (1.32 KB)
Edit
Rename
Del
Console/
Rename
Del
Contracts/
Rename
Del
ControllerDispatcher.php (2.22 KB)
Edit
Rename
Del
Controllers/
Rename
Del
Events/
Rename
Del
Exceptions/
Rename
Del
FiltersControllerMiddleware.php (524 B)
Edit
Rename
Del
ImplicitRouteBinding.php (4.32 KB)
Edit
Rename
Del
LICENSE.md (1.05 KB)
Edit
Rename
Del
Matching/
Rename
Del
Middleware/
Rename
Del
PendingResourceRegistration.php (7.51 KB)
Edit
Rename
Del
PendingSingletonResourceRegistration.php (6.78 KB)
Edit
Rename
Del
Pipeline.php (1.49 KB)
Edit
Rename
Del
RedirectController.php (1.22 KB)
Edit
Rename
Del
Redirector.php (7.17 KB)
Edit
Rename
Del
ResolvesRouteDependencies.php (3.82 KB)
Edit
Rename
Del
ResourceRegistrar.php (21.7 KB)
Edit
Rename
Del
ResponseFactory.php (11.41 KB)
Edit
Rename
Del
RouteAction.php (3.38 KB)
Edit
Rename
Del
RouteCollection.php (8.52 KB)
Edit
Rename
Del
RouteDependencyResolverTrait.php (135 B)
Edit
Rename
Del
RouteFileRegistrar.php (621 B)
Edit
Rename
Del
RouteGroup.php (2.67 KB)
Edit
Rename
Del
RouteParameterBinder.php (3.02 KB)
Edit
Rename
Del
RouteRegistrar.php (9.25 KB)
Edit
Rename
Del
RouteUri.php (1.27 KB)
Edit
Rename
Del
RouteUrlGenerator.php (14.61 KB)
Edit
Rename
Del
RoutingServiceProvider.php (6.69 KB)
Edit
Rename
Del
SortedMiddleware.php (3.74 KB)
Edit
Rename
Del
UrlGenerator.php (24.28 KB)
Edit
Rename
Del
composer.json (1.67 KB)
Edit
Rename
Del
Edit: RouteGroup.php
<?php namespace Illuminate\Routing; use Illuminate\Support\Arr; class RouteGroup { /** * Merge route groups into a new array. * * @param array $new * @param array $old * @param bool $prependExistingPrefix * @return array */ public static function merge($new, $old, $prependExistingPrefix = true) { if (isset($new['domain'])) { unset($old['domain']); } if (isset($new['controller'])) { unset($old['controller']); } $new = array_merge(static::formatAs($new, $old), [ 'namespace' => static::formatNamespace($new, $old), 'prefix' => static::formatPrefix($new, $old, $prependExistingPrefix), 'where' => static::formatWhere($new, $old), ]); return array_merge_recursive(Arr::except( $old, ['namespace', 'prefix', 'where', 'as'] ), $new); } /** * Format the namespace for the new group attributes. * * @param array $new * @param array $old * @return string|null */ protected static function formatNamespace($new, $old) { if (isset($new['namespace'])) { return isset($old['namespace']) && ! str_starts_with($new['namespace'], '\\') ? trim($old['namespace'], '\\').'\\'.trim($new['namespace'], '\\') : trim($new['namespace'], '\\'); } return $old['namespace'] ?? null; } /** * Format the prefix for the new group attributes. * * @param array $new * @param array $old * @param bool $prependExistingPrefix * @return string|null */ protected static function formatPrefix($new, $old, $prependExistingPrefix = true) { $old = $old['prefix'] ?? ''; if ($prependExistingPrefix) { return isset($new['prefix']) ? trim($old, '/').'/'.trim($new['prefix'], '/') : $old; } return isset($new['prefix']) ? trim($new['prefix'], '/').'/'.trim($old, '/') : $old; } /** * Format the "wheres" for the new group attributes. * * @param array $new * @param array $old * @return array */ protected static function formatWhere($new, $old) { return array_merge( $old['where'] ?? [], $new['where'] ?? [] ); } /** * Format the "as" clause of the new group attributes. * * @param array $new * @param array $old * @return array */ protected static function formatAs($new, $old) { if (isset($old['as'])) { $new['as'] = $old['as'].($new['as'] ?? ''); } return $new; } }
Simpan