Skip to content

Commit d7c5bad

Browse files
committed
moved logic from the view to Route
1 parent 2c92e98 commit d7c5bad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

resources/docblock.blade.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**{!! when(!str_contains($controller, '\\Closure'), PHP_EOL . " * @see {$controller}::" . ($isInvokable ? '__invoke' : $docblock_method ?? $method)) !!}
2-
* @see {!! str_replace(DIRECTORY_SEPARATOR, '/', $path) !!}:{!! $line !!}
2+
* @see {!! $path !!}:{!! $line !!}
33
@foreach ($parameters as $parameter)
44
@if ($parameter->default !== null)
55
* @param {!! $parameter->name !!} - Default: @js($parameter->default)

src/Route.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private function finalJsMethod(string $method): string
183183

184184
private function relativePath(string $path)
185185
{
186-
return ltrim(str_replace(base_path(), '', $path), DIRECTORY_SEPARATOR);
186+
return str($path)->replace(base_path(), '')->ltrim(DIRECTORY_SEPARATOR)->replace(DIRECTORY_SEPARATOR, '/')->toString();
187187
}
188188

189189
private function closure(): Closure

0 commit comments

Comments
 (0)