laravel / folio

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

[1.x] Allows multiple Folio mounted paths per URI #67

Closed nunomaduro closed 1 year ago

nunomaduro commented 1 year ago

This pull request allows the usage of multiple Folio route registrations per project URI, here is an example of how to use it:

// Domain examples...
Folio::domain('dashboard.example.com')->path('resources/pages/dashboard');
Folio::domain('example.com')->path('resources/pages/landing');

// Middleware examples...
Folio::route('/app')->path('resources/pages/trial-user-pages')
    ->middleware([/** Trial Middleware */]
Folio::route('/app')->path('resources/pages/subscribed-user-pages')
    ->middleware([/** Subscribed Middleware */]
winavin commented 10 months ago
    Folio::path(resource_path("views/pages/"));
    Folio::domain('domain1.test')->path(resource_path("views/pages/tenants/domain1"));
    Folio::domain('domain2.test')->path(resource_path("views/pages/tenants/domain2"));

    only one domain1 is working. another is not working. direct paths are working