We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2c0604 commit ed8565dCopy full SHA for ed8565d
src/GatesServiceProvider.php
@@ -39,14 +39,12 @@ protected function loadGates()
39
40
$files = ! empty($paths) ? (new Finder)->in($paths)->files() : [];
41
42
- $namespace = $this->app->getNamespace();
43
-
44
collect($files)
45
- ->map(function ($file) use ($namespace) {
46
- return $namespace.str_replace(
+ ->map(function ($file) {
+ return str_replace(
47
['/', '.php'],
48
['\\', ''],
49
- Str::after($file->getPathname(), realpath(app_path()).DIRECTORY_SEPARATOR)
+ Str::ucfirst(Str::after($file->getPathname(), realpath(base_path()).DIRECTORY_SEPARATOR))
50
);
51
})
52
->merge(config('gates.classes'))
0 commit comments