laravel / folio

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

Route model binding for a model called "Event" throws a "does not implement the UrlRoutable interface" error #83

Closed farez closed 1 year ago

farez commented 1 year ago

Folio Version

1.0.0-beta.4

Laravel Version

10.18.0

PHP Version

8.1

Description

When I use folio with route model binding for a model named Event, it thows this error:

Folio route attempting to bind to class [Event], but it does not implement the UrlRoutable interface.

This doesn't happen for my other models. And it doesn't happen when I specifically tells it where the model is using [.App.Models.Event].blade.php as the filename.

I'm wondering whether it's picking up another Event class from somewhere else?

Steps To Reproduce

Create a model called Event.

Create the folio page: php artisan make:folio "events/[Event]"

Access the page with /events/[event-id]

Error is thrown.