Skip to content

Commit

Permalink
Wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerkretzmar committed Mar 20, 2024
1 parent aedbc16 commit 794f469
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Ziggy.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ private function folioRoutes(): Collection

// Use already-registered named Folio routes (instead of searching for all relevant view files) to respect route caching
return collect(app(FolioRoutes::class)->routes())->map(function (array $route) use ($mountPaths) {
// TODO windows paths
// str_replace(DIRECTORY_SEPARATOR, '/', )
dump($route);
$uri = rtrim($route['baseUri'], '/') . str_replace($route['mountPath'], '', $route['path']);
$uri = str_replace('.blade.php', '', $uri);

Expand Down Expand Up @@ -274,6 +277,8 @@ private function folioRoutes(): Collection

$matchedView = new MatchedView(realpath($route['path']), [], $route['mountPath']);
$mountPath = Arr::first($mountPaths, fn ($mountPath) => $mountPath->path === realpath($route['mountPath']));
dump($matchedView);
dump($mountPath);

return array_filter([
'uri' => $uri === '' ? '/' : trim($uri, '/'),
Expand Down

0 comments on commit 794f469

Please sign in to comment.