laravel / folio

Page based routing for Laravel.
MIT License
568 stars 46 forks source link

Empty segments in multi-segment wildcard views are not possible #118

Closed inmanturbo closed 12 months ago

inmanturbo commented 12 months ago

Folio Version

1.1.3

Laravel Version

10.4.1

PHP Version

8.2.11

Description

Consider the following view: resources/views/pages/users/[...ids].blade.php

<ul>
    @forelse(\App\Models\User::whereIn('id', $ids)->get() as $user)
       <li>{{ $user->email }}</li>
    @empty
       <li>No users available</li>
    @endforelse
</ul>

When you browse to /users you might expect to see 'No users available', however instead you will get 404.

Steps To Reproduce

Install folio and paste the above contents into resources/views/pages/users/[...ids].blade.php, then browse to '/users' in your application

driesvints commented 12 months ago

Seems you already sent in a PR so let's see how it goes. Thanks 👍