Z3d0X / filament-fabricator

Block-Based Page Builder Skeleton for your Filament Apps
https://filamentphp.com/plugins/fabricator
MIT License
270 stars 52 forks source link

Bug default routing config has few bugs #25

Closed mrlinnth closed 1 year ago

mrlinnth commented 1 year ago

Default routing config is

    'routing' => [
        'enabled' => true,
        'prefix'  => null, //    /pages
    ],

With default values, you will receive 404 errors for non-filament routes with ModelNotFoundException for No query results for model [Z3d0X\FilamentFabricator\Models\Page].

1st workaround is to disable the routing but then you won't be able to use fabricator page routes.

2nd workaround is to use a prefix for the fabricator routing eg: pages.

However non-null prefix values cause another minor bug for the Visit action of Page resource.

Filament default route prefix is /admin and fabricator will send you to /admin/pages/xyz instead of /pagess/page-xyz when you click the Visit action of your fabricator page.