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

Controller groups #66

Open
alexanderthegreat96 opened this issue Apr 19, 2022 · 5 comments
Open

Controller groups #66

alexanderthegreat96 opened this issue Apr 19, 2022 · 5 comments

Comments

@alexanderthegreat96
Copy link

Is to possible to use controller groups. As Laravel does.

Defining controller + group in the same spot and then applying all the routes to the parent controller?

@izniburak
Copy link
Owner

Hi @alexanderthegreat96 ,
You talking about Route grouping? If you are, did you check this documentation?

@alexanderthegreat96
Copy link
Author

Nope. You know how you use groups to define prefixes. How about using Controller groups.

Just like laravel does it. So when you specify the group , how about specifying a controller for the group without having to declare it in each controller method.

Like so

$route->group('group',function()
{
$route->get('list','listMethodWithingMyController')
}, 'MyController::classs');

or

$route->controller(MyController::class)->group('my-group',function()
{
$route->get('list','listMethodWithingMyController')
})

Understand now?

@izniburak
Copy link
Owner

Okay. For now, the Package no support such a usage like that but we can add this feature in next releases. I'll add it to my notes to implement it as soon as possible.

@alexanderthegreat96
Copy link
Author

Thank you. I really appreciate it.

@AlexJMcloud
Copy link

AlexJMcloud commented Dec 28, 2022

Okay. For now, the Package no support such a usage like that but we can add this feature in next releases. I'll add it to my notes to implement it as soon as possible.

There is a rational suggestion, what I sent you by mail with the processing of an array of routes, then there you can specify the controller for the group. And process a group with one controller and with different methods. Within the current version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants