Made it possible to publish and edit routes.#4
Open
leon-fablr wants to merge 1 commit intoalt-design:mainfrom
Open
Made it possible to publish and edit routes.#4leon-fablr wants to merge 1 commit intoalt-design:mainfrom
leon-fablr wants to merge 1 commit intoalt-design:mainfrom
Conversation
web.php and cp.php are published to routes/vendor/alt-google-2fa/ and the extension will load these instead of its routes/ files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I can't actually find any way to edit the URIs of the routes this package uses. This PR is intended to address that.
This allows the projects using this package to publish the package's routes to routes/vendor/alt-google-2fa/ so they can be edited. The changes also make the service provider check for these and use them if present. It should be a case of running this and editing the files it creates:
If there's a better way to make these URIs editable, I'm open to suggestions. I can absolutely understand if you don't want to expose these files - I'd imagine there's potential for a maintenance headache if you ever need to add new routes. However, from what I gather the next version of Statamic is going to have 2FA built in, so it probably won't be an issue?
Apologies if this isn't very idiomatic to Laravel - I'm pretty new to using it. I'm absolutely fine with any tweaks to this if you're happy with the core approach or an entirely different approach if you're not.