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.
Cashier is at the moment one of the only Laravel packages which doesn't uses a config file. I think it would be better if it was more in line of the other packages by making use of one. This is what people are used to as well. These changes add a config file and cleans up the way configuration is handled within cashier.
An additional benefit is that the config for the stripe keys and web hooks is now included in Cashier itself and not outside of it anymore in the default
services.php
config file which ships with the Laravel skeleton. This keeps everything in exactly the place where you expect it to be and makes more sense.Some configuration was kept in the
Cashier
class like the custom money formatting (closure which can't be in a config file) and the disabling of migrations (aligned with Passport and something you'd explicitly want to do in a service provider).Another small change is the rename of
STRIPE_MODEL
toCASHIER_MODEL
since that env variable is Cashier specfic and not Stripe specific.This also allows us to easily add new config options in later pull requests (like the email reminder option in the payment intents PR).
Closes #531