laravel / folio

Page based routing for Laravel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nested model route binding disables views

thomas-serverhouse opened this issue · comments

Folio Version

1.1.2

Laravel Version

10.26.2

PHP Version

8.2.3

Description

This issue is, I think, related to the issue #105 and was introduced in version 1.1.1

When using Folio I'm unable to display a create page when a subfolder [Model] exists.
The index page is however correctly displayed.

Steps To Reproduce

Here's what my pages folder look like:

Screenshot 2023-10-09 at 10 25 20

And here's what php artisan folio:list shows:

Screenshot 2023-10-09 at 10 43 56

  • The movies/index.blade.php correctly displays all of my movies
  • The movies/[Movie].blade.php correctly displays the details of a single movie (if i change it to movies/[Movie]/index.blade.php it also works)
  • The movies/[Movie]/characters.blade.php correctly displays all characters in a movie
  • The movies/create.blade.php doesn't work and returns a 404 error

If I remove the [Movie] folder the create page is displayed.
If I force composer to use v1.1.0 everything works as intended.

What happens if you try something like this?

- movies/[Movie]/index.blade.php
- movies/[Movie]/characters.blade.php
- movies/index.blade.php
- movies/create.blade.php

If i move the movies/[Movie].blade.php file to movies/[Movie]/index.blade.php the same thing happens, only the /movies/create url gives me a 404 error

Screenshot 2023-10-09 at 14 12 26

Hello team,
Thanks for the great job. Laravel Folio is really amazing.

Thus, I don't know if I should create a new issue for it has almost the same topic.
I still have some routes (files) that are not accessible due to collision with another wildcard route.

image

The route /create is not reachable. When trying to access it, Folio keeps using /{id} and just passes the term create as $id.

Here, I'm not using implicit model binding.


Folio Version
v1.1.3

Laravel Version
v10.22.0

PHP Version
v8.2.3