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

Add common support for API in packages #64

Merged
merged 8 commits into from
Feb 26, 2021

Conversation

pdbreen
Copy link
Contributor

@pdbreen pdbreen commented Feb 26, 2021

No description provided.

@pdbreen pdbreen marked this pull request as ready for review February 26, 2021 14:45
Comment on lines 61 to 77
public function hasRoute(string $routeFileName): Package
{
if (config('tipoff.api.enabled')) {
return parent::hasRoute($routeFileName);
}

return $this;
}

public function hasRoutes(...$routeFileNames): Package
{
if (config('tipoff.api.enabled')) {
return parent::hasRoutes(...$routeFileNames);
}

return $this;
}
Copy link
Member

Choose a reason for hiding this comment

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

Should these be hasApiRoute and hasApiRoutes to distinguish from the other routes the package may provide?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure - we can do that. I'll add in config and methods for web routes at the same time. One sec.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@drewroberts drewroberts left a comment

Choose a reason for hiding this comment

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

This is great! Thank you! 🚜

@drewroberts drewroberts merged commit 2d414a5 into main Feb 26, 2021
@drewroberts drewroberts deleted the pdbreen/feature/api-support branch February 26, 2021 16:17
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.

2 participants