-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
src/TipoffPackage.php
Outdated
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; | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this 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! 🚜
No description provided.