Skip to content

Create a nicer fluent tenanted route group builder #93

Closed as not planned
Closed as not planned
@ollieread

Description

@ollieread

The current approach of using a mixin on Router is, while keeping with how Laravel expects things to be done, something that leaves a sour taste in my mouth.

I think a better approach would be a nice statically created fluent builder. So instead of this:

Route::tenanted(function () {
    // Routes
}, 'subdomain', 'blogs');

You could do something like:

TenantRoutes::for('blogs')
    ->using('subdomain')
    ->name('blogs:')
    ->routes(function () {
        // Routes
    });

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions