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

Refactor route registration logic for improved #50753

Closed
wants to merge 6 commits into from

Conversation

mdzahid-pro
Copy link

This commit enhances the route registration logic in the Laravel framework to support domain-specific API routes. It introduces a more streamlined approach to handle cases where a domain is provided, ensuring proper routing for API endpoints. The code has been refactored for improved readability and maintainability, offering a more robust solution for defining routes within different contexts.

This commit enhances the route registration logic in the Laravel framework to support domain-specific API routes. It introduces a more streamlined approach to handle cases where a domain is provided, ensuring proper routing for API endpoints. The code has been refactored for improved readability and maintainability, offering a more robust solution for defining routes within different contexts.
@@ -274,7 +283,7 @@ public function withCommands(array $commands = [])
protected function withCommandRouting(array $paths)
{
$this->app->afterResolving(ConsoleKernel::class, function ($kernel) use ($paths) {
$this->app->booted(fn () => $kernel->addCommandRoutePaths($paths));
$kernel->setCommandRoutePaths($paths);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo these changes from #50742.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my first contribution in laravel if you can share more information which method should I undo that will help me to do this

…ate\Foundation\Configuration namespace to improve its readability and maintainability. Key changes include:

Consistent method parameter naming and documentation.
Improved method signatures for better clarity and understanding.
Enhanced conditional logic within the withRouting method to streamline route configuration.
Improved type declarations and return types for method signatures.
@taylorotwell
Copy link
Member

I am closing this pull request because it lacks sufficient explanation, tests, or both. It is difficult for us to merge pull requests without these things because the change may introduce breaking changes to the framework.

Feel free to re-submit your change with a thorough explanation of the feature and tests - integration tests are preferred over unit tests. Please include it's benefit to end users; the reasons it does not break any existing features; how it makes building web applications easier, etc.

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants