Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a nicer fluent tenanted route group builder #93

Open
ollieread opened this issue Jan 29, 2025 · 0 comments
Open

Create a nicer fluent tenanted route group builder #93

ollieread opened this issue Jan 29, 2025 · 0 comments
Assignees
Labels
status: investigating The issue is being investigated type: refactor Refactoring of code

Comments

@ollieread
Copy link
Member

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
    });
@ollieread ollieread self-assigned this Jan 29, 2025
@ollieread ollieread converted this from a draft issue Jan 29, 2025
@ollieread ollieread added type: refactor Refactoring of code status: investigating The issue is being investigated labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: investigating The issue is being investigated type: refactor Refactoring of code
Projects
Status: Backlog
Development

No branches or pull requests

1 participant