You are subscribed.
\n" +"@endif" +msgstr "" + +# P +#: ./docs/8.x/billing.md:366 +#: ./docs/9.x/billing.md:393 +#: ./docs/10.x/billing.md:575 +#: ./docs/11.x/billing.md:572 +#: ./docs/master/billing.md:575 msgid "By default, when the user is finished managing their subscription, they will be able to return to the `home` route of your application via a link within the Stripe billing portal. You may provide a custom URL that the user should return to by passing the URL as an argument to the `redirectToBillingPortal` method:" msgstr "" -#: docs/10.x/billing.md:block 118 (code) +# P +#: ./docs/10.x/billing.md:368 +#: ./docs/11.x/billing.md:365 +#: ./docs/master/billing.md:368 +msgid "We can even easily determine if a user is subscribed to specific product or price:" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:368 +#: ./docs/9.x/billing.md:395 +#: ./docs/10.x/billing.md:577 +#: ./docs/11.x/billing.md:574 +#: ./docs/master/billing.md:577 msgid "use Illuminate\\Http\\Request;\n\n" "Route::get('/billing-portal', function (Request $request) {\n" " return $request->user()->redirectToBillingPortal(route('billing'));\n" -"});\n" -msgstr "" - -#: docs/10.x/billing.md:block 119 (paragraph) +"});" +msgstr "" + +# CODE: blade +#: ./docs/10.x/billing.md:370 +#: ./docs/11.x/billing.md:367 +#: ./docs/master/billing.md:370 +msgid "@if ($user->subscribedToProduct('pro_basic'))\n" +"You are subscribed to our Basic product.
\n" +"@endif\n\n" +"@if ($user->subscribedToPrice('price_basic_monthly'))\n" +"You are subscribed to our monthly Basic plan.
\n" +"@endif" +msgstr "" + +# P +#: ./docs/8.x/billing.md:374 +#: ./docs/9.x/billing.md:401 +#: ./docs/10.x/billing.md:583 +#: ./docs/11.x/billing.md:580 +#: ./docs/master/billing.md:583 msgid "If you would like to generate the URL to the billing portal without generating an HTTP redirect response, you may invoke the `billingPortalUrl` method:" msgstr "" -#: docs/10.x/billing.md:block 120 (code) -msgid "$url = $request->user()->billingPortalUrl(route('billing'));\n" +# CODE +#: ./docs/8.x/billing.md:376 +#: ./docs/9.x/billing.md:403 +#: ./docs/10.x/billing.md:585 +#: ./docs/11.x/billing.md:582 +#: ./docs/master/billing.md:585 +msgid "$url = $request->user()->billingPortalUrl(route('billing'));" +msgstr "" + +# P +#: ./docs/8.x/billing.md:378 +#: ./docs/9.x/billing.md:405 +#: ./docs/10.x/billing.md:587 +#: ./docs/11.x/billing.md:584 +#: ./docs/master/billing.md:587 +#~ msgid "" +#~ msgstr "" + +# H2 +#: ./docs/8.x/billing.md:379 +#: ./docs/9.x/billing.md:406 +#: ./docs/10.x/billing.md:588 +#: ./docs/11.x/billing.md:585 +#: ./docs/master/billing.md:588 +msgid "Payment Methods" msgstr "" -#: docs/10.x/billing.md:block 122 (header) -msgid "Payment Methods" +# P +#: ./docs/10.x/billing.md:380 +#: ./docs/11.x/billing.md:377 +#: ./docs/master/billing.md:380 +#~ msgid "" +#~ msgstr "" + +# P +#: ./docs/9.x/billing.md:380 +#: ./docs/10.x/billing.md:562 +#: ./docs/11.x/billing.md:559 +#: ./docs/master/billing.md:562 +msgid "Similarly, you may override the `stripeEmail`, `stripePhone`, `stripeAddress`, and `stripePreferredLocales` methods. These methods will sync information to their corresponding customer parameters when [updating the Stripe customer object](https://stripe.com/docs/api/customers/update). If you wish to take total control over the customer information sync process, you may override the `syncStripeCustomerDetails` method." msgstr "" -#: docs/10.x/billing.md:block 124 (header) +# H4 +#: ./docs/10.x/billing.md:381 +#: ./docs/11.x/billing.md:378 +#: ./docs/master/billing.md:381 +msgid "Building a Subscribed Middleware" +msgstr "" + +# P +#: ./docs/8.x/billing.md:381 +#: ./docs/9.x/billing.md:408 +#: ./docs/10.x/billing.md:590 +#: ./docs/11.x/billing.md:587 +#: ./docs/master/billing.md:590 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:382 +#: ./docs/9.x/billing.md:409 +#: ./docs/10.x/billing.md:591 +#: ./docs/11.x/billing.md:588 +#: ./docs/master/billing.md:591 msgid "Storing Payment Methods" msgstr "" -#: docs/10.x/billing.md:block 125 (paragraph) -msgid "In order to create subscriptions or perform \"one-off\" charges with Stripe, you will need to store a payment method and retrieve its identifier from Stripe. The approach used to accomplish this differs based on whether you plan to use the payment method for subscriptions or single charges, so we will examine both below." +# P +#: ./docs/10.x/billing.md:383 +#: ./docs/11.x/billing.md:380 +#: ./docs/master/billing.md:383 +msgid "For convenience, you may wish to create a [middleware](/docs/{{version}}/middleware) which determines if the incoming request is from a subscribed user. Once this middleware has been defined, you may easily assign it to a route to prevent users that are not subscribed from accessing the route:" +msgstr "" + +# P +#: ./docs/8.x/billing.md:384 +msgid "In order to create subscriptions or perform \"one off\" charges with Stripe, you will need to store a payment method and retrieve its identifier from Stripe. The approach used to accomplish this differs based on whether you plan to use the payment method for subscriptions or single charges, so we will examine both below." +msgstr "" + +# CODE +#: ./docs/10.x/billing.md:385 +#: ./docs/11.x/billing.md:382 +#: ./docs/master/billing.md:385 +msgid "user()?->subscribed()) {\n" +" // Redirect user to billing page and ask them to subscribe...\n" +" return redirect('/billing');\n" +" }\n\n" +" return $next($request);\n" +" }\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 127 (header) +# P +#: ./docs/8.x/billing.md:386 +#: ./docs/9.x/billing.md:413 +#: ./docs/10.x/billing.md:595 +#: ./docs/11.x/billing.md:592 +#: ./docs/master/billing.md:595 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:387 +#: ./docs/9.x/billing.md:414 msgid "Payment Methods For Subscriptions" msgstr "" -#: docs/10.x/billing.md:block 128 (paragraph) +# P +#: ./docs/8.x/billing.md:389 +#: ./docs/9.x/billing.md:416 +#: ./docs/10.x/billing.md:598 +#: ./docs/11.x/billing.md:595 +#: ./docs/master/billing.md:598 msgid "When storing a customer's credit card information for future use by a subscription, the Stripe \"Setup Intents\" API must be used to securely gather the customer's payment method details. A \"Setup Intent\" indicates to Stripe the intention to charge a customer's payment method. Cashier's `Billable` trait includes the `createSetupIntent` method to easily create a new Setup Intent. You should invoke this method from the route or controller that will render the form which gathers your customer's payment method details:" msgstr "" -#: docs/10.x/billing.md:block 129 (code) +# CODE +#: ./docs/8.x/billing.md:391 +#: ./docs/9.x/billing.md:418 +#: ./docs/10.x/billing.md:600 +#: ./docs/11.x/billing.md:597 +#: ./docs/master/billing.md:600 msgid "return view('update-payment-method', [\n" " 'intent' => $user->createSetupIntent()\n" -"]);\n" +"]);" msgstr "" -#: docs/10.x/billing.md:block 130 (paragraph) +# P +#: ./docs/8.x/billing.md:395 +#: ./docs/9.x/billing.md:422 +#: ./docs/10.x/billing.md:604 +#: ./docs/11.x/billing.md:601 +#: ./docs/master/billing.md:604 msgid "After you have created the Setup Intent and passed it to the view, you should attach its secret to the element that will gather the payment method. For example, consider this \"update payment method\" form:" msgstr "" -#: docs/10.x/billing.md:block 131 (code) +# CODE: html +#: ./docs/8.x/billing.md:397 +#: ./docs/9.x/billing.md:424 +#: ./docs/10.x/billing.md:606 +#: ./docs/11.x/billing.md:603 +#: ./docs/master/billing.md:606 msgid "\n\n" "\n" "\n\n" "\n" +"" msgstr "" -#: docs/10.x/billing.md:block 132 (paragraph) +# P +#: ./docs/8.x/billing.md:408 +#: ./docs/9.x/billing.md:435 +#: ./docs/10.x/billing.md:617 +#: ./docs/11.x/billing.md:614 +#: ./docs/master/billing.md:617 msgid "Next, the Stripe.js library may be used to attach a [Stripe Element](https://stripe.com/docs/stripe-js) to the form and securely gather the customer's payment details:" msgstr "" -#: docs/10.x/billing.md:block 133 (code) +# P +#: ./docs/10.x/billing.md:409 +#: ./docs/11.x/billing.md:406 +#: ./docs/master/billing.md:409 +msgid "Once the middleware has been defined, you may assign it to a route:" +msgstr "" + +# CODE: html +#: ./docs/8.x/billing.md:410 +#: ./docs/8.x/billing.md:470 +#: ./docs/9.x/billing.md:437 +#: ./docs/9.x/billing.md:498 +#: ./docs/10.x/billing.md:619 +#: ./docs/10.x/billing.md:680 +#: ./docs/11.x/billing.md:616 +#: ./docs/11.x/billing.md:677 +#: ./docs/master/billing.md:619 +#: ./docs/master/billing.md:680 msgid "\n\n" "\n" +"" +msgstr "" + +# CODE +#: ./docs/10.x/billing.md:411 +#: ./docs/11.x/billing.md:408 +#: ./docs/master/billing.md:411 +msgid "use App\\Http\\Middleware\\Subscribed;\n\n" +"Route::get('/dashboard', function () {\n" +" // ...\n" +"})->middleware([Subscribed::class]);" +msgstr "" + +# P +#: ./docs/9.x/billing.md:411 +#: ./docs/10.x/billing.md:593 +#: ./docs/11.x/billing.md:590 +#: ./docs/master/billing.md:593 +msgid "In order to create subscriptions or perform \"one-off\" charges with Stripe, you will need to store a payment method and retrieve its identifier from Stripe. The approach used to accomplish this differs based on whether you plan to use the payment method for subscriptions or single charges, so we will examine both below." +msgstr "" + +# P +#: ./docs/10.x/billing.md:417 +#: ./docs/11.x/billing.md:414 +#: ./docs/master/billing.md:417 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/10.x/billing.md:418 +#: ./docs/11.x/billing.md:415 +#: ./docs/master/billing.md:418 +msgid "Allowing Customers to Manage Their Billing Plan" +msgstr "" + +# P +#: ./docs/10.x/billing.md:420 +#: ./docs/11.x/billing.md:417 +#: ./docs/master/billing.md:420 +msgid "Of course, customers may want to change their subscription plan to another product or \"tier\". The easiest way to allow this is by directing customers to Stripe's [Customer Billing Portal](https://stripe.com/docs/no-code/customer-portal), which provides a hosted user interface that allows customers to download invoices, update their payment method, and change subscription plans." +msgstr "" + +# P +#: ./docs/10.x/billing.md:422 +#: ./docs/11.x/billing.md:419 +#: ./docs/master/billing.md:422 +msgid "First, define a link or button within your application that directs users to a Laravel route which we will utilize to initiate a Billing Portal session:" msgstr "" -#: docs/10.x/billing.md:block 134 (paragraph) +# P +#: ./docs/8.x/billing.md:423 +#: ./docs/9.x/billing.md:450 +#: ./docs/10.x/billing.md:632 +#: ./docs/11.x/billing.md:629 +#: ./docs/master/billing.md:632 msgid "Next, the card can be verified and a secure \"payment method identifier\" can be retrieved from Stripe using [Stripe's `confirmCardSetup` method](https://stripe.com/docs/js/setup_intents/confirm_card_setup):" msgstr "" -#: docs/10.x/billing.md:block 135 (code) +# CODE: blade +#: ./docs/10.x/billing.md:424 +#: ./docs/11.x/billing.md:421 +#: ./docs/master/billing.md:424 +msgid "\n" +" Billing\n" +"" +msgstr "" + +# CODE: js +#: ./docs/8.x/billing.md:425 +#: ./docs/9.x/billing.md:452 +#: ./docs/10.x/billing.md:634 +#: ./docs/11.x/billing.md:631 +#: ./docs/master/billing.md:634 msgid "const cardHolderName = document.getElementById('card-holder-name');\n" "const cardButton = document.getElementById('card-button');\n" "const clientSecret = cardButton.dataset.secret;\n\n" @@ -832,43 +2444,117 @@ msgid "const cardHolderName = document.getElementById('card-holder-name');\n" " } else {\n" " // The card has been verified successfully...\n" " }\n" -"});\n" +"});" +msgstr "" + +# P +#: ./docs/10.x/billing.md:430 +#: ./docs/11.x/billing.md:427 +#: ./docs/master/billing.md:430 +msgid "Next, let's define the route that initiates a Stripe Customer Billing Portal session and redirects the user to the Portal. The `redirectToBillingPortal` method accepts the URL that users should be returned to when exiting the Portal:" +msgstr "" + +# CODE +#: ./docs/10.x/billing.md:432 +#: ./docs/11.x/billing.md:429 +#: ./docs/master/billing.md:432 +msgid "use Illuminate\\Http\\Request;\n\n" +"Route::get('/billing', function (Request $request) {\n" +" return $request->user()->redirectToBillingPortal(route('dashboard'));\n" +"})->middleware(['auth'])->name('billing');" +msgstr "" + +# P +#: ./docs/11.x/billing.md:436 +msgid "As long as you have configured Cashier's webhook handling, Cashier will automatically keep your application's Cashier-related database tables in sync by inspecting the incoming webhooks from Stripe. So, for example, when a user cancels their subscription via Stripe's Customer Billing Portal, Cashier will receive the corresponding webhook and mark the subscription as \"canceled\" in your application's database." +msgstr "" + +# P +#: ./docs/10.x/billing.md:439 +#: ./docs/master/billing.md:439 +msgid "As long as you have configured Cashier's webhook handling, Cashier will automatically keep your application's Cashier-related database tables in sync by inspecting the incoming webhooks from Stripe. So, for example, when a user cancels their subscription via Stripe's Customer Billing Portal, Cashier will receive the corresponding webhook and mark the subscription as \"cancelled\" in your application's database." msgstr "" -#: docs/10.x/billing.md:block 136 (paragraph) +# P +#: ./docs/8.x/billing.md:448 +#: ./docs/9.x/billing.md:475 +#: ./docs/10.x/billing.md:657 +#: ./docs/11.x/billing.md:654 +#: ./docs/master/billing.md:657 msgid "After the card has been verified by Stripe, you may pass the resulting `setupIntent.payment_method` identifier to your Laravel application, where it can be attached to the customer. The payment method can either be [added as a new payment method](#adding-payment-methods) or [used to update the default payment method](#updating-the-default-payment-method). You can also immediately use the payment method identifier to [create a new subscription](#creating-subscriptions)." msgstr "" -#: docs/10.x/billing.md:block 137 (quote) -msgid "**Note** If you would like more information about Setup Intents and gathering customer payment details please [review this overview provided by Stripe](https://stripe.com/docs/payments/save-and-reuse#php)." +# P +#: ./docs/8.x/billing.md:450 +#: ./docs/9.x/billing.md:478 +#: ./docs/10.x/billing.md:660 +#: ./docs/11.x/billing.md:657 +#: ./docs/master/billing.md:660 +msgid "If you would like more information about Setup Intents and gathering customer payment details please [review this overview provided by Stripe](https://stripe.com/docs/payments/save-and-reuse#php)." msgstr "" -#: docs/10.x/billing.md:block 139 (header) +# P +#: ./docs/8.x/billing.md:452 +#: ./docs/9.x/billing.md:480 +#: ./docs/10.x/billing.md:662 +#: ./docs/11.x/billing.md:659 +#: ./docs/master/billing.md:662 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:453 +#: ./docs/9.x/billing.md:481 msgid "Payment Methods For Single Charges" msgstr "" -#: docs/10.x/billing.md:block 140 (paragraph) +# P +#: ./docs/8.x/billing.md:455 +#: ./docs/9.x/billing.md:483 +#: ./docs/10.x/billing.md:665 +#: ./docs/11.x/billing.md:662 +#: ./docs/master/billing.md:665 msgid "Of course, when making a single charge against a customer's payment method, we will only need to use a payment method identifier once. Due to Stripe limitations, you may not use the stored default payment method of a customer for single charges. You must allow the customer to enter their payment method details using the Stripe.js library. For example, consider the following form:" msgstr "" -#: docs/10.x/billing.md:block 141 (code) +# CODE: html +#: ./docs/8.x/billing.md:457 +#: ./docs/9.x/billing.md:485 +#: ./docs/10.x/billing.md:667 +#: ./docs/11.x/billing.md:664 +#: ./docs/master/billing.md:667 msgid "\n\n" "\n" "\n\n" "\n" +"" msgstr "" -#: docs/10.x/billing.md:block 142 (paragraph) +# P +#: ./docs/8.x/billing.md:468 +#: ./docs/9.x/billing.md:496 +#: ./docs/10.x/billing.md:678 +#: ./docs/11.x/billing.md:675 +#: ./docs/master/billing.md:678 msgid "After defining such a form, the Stripe.js library may be used to attach a [Stripe Element](https://stripe.com/docs/stripe-js) to the form and securely gather the customer's payment details:" msgstr "" -#: docs/10.x/billing.md:block 144 (paragraph) +# P +#: ./docs/8.x/billing.md:483 +#: ./docs/9.x/billing.md:511 +#: ./docs/10.x/billing.md:693 +#: ./docs/11.x/billing.md:690 +#: ./docs/master/billing.md:693 msgid "Next, the card can be verified and a secure \"payment method identifier\" can be retrieved from Stripe using [Stripe's `createPaymentMethod` method](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method):" msgstr "" -#: docs/10.x/billing.md:block 145 (code) +# CODE: js +#: ./docs/8.x/billing.md:485 +#: ./docs/9.x/billing.md:513 +#: ./docs/10.x/billing.md:695 +#: ./docs/11.x/billing.md:692 +#: ./docs/master/billing.md:695 msgid "const cardHolderName = document.getElementById('card-holder-name');\n" "const cardButton = document.getElementById('card-button');\n\n" "cardButton.addEventListener('click', async (e) => {\n" @@ -882,406 +2568,827 @@ msgid "const cardHolderName = document.getElementById('card-holder-name');\n" " } else {\n" " // The card has been verified successfully...\n" " }\n" -"});\n" +"});" msgstr "" -#: docs/10.x/billing.md:block 146 (paragraph) +# P +#: ./docs/8.x/billing.md:504 +#: ./docs/9.x/billing.md:532 +#: ./docs/10.x/billing.md:714 +#: ./docs/11.x/billing.md:711 +#: ./docs/master/billing.md:714 msgid "If the card is verified successfully, you may pass the `paymentMethod.id` to your Laravel application and process a [single charge](#simple-charge)." msgstr "" -#: docs/10.x/billing.md:block 148 (header) +# P +#: ./docs/8.x/billing.md:506 +#: ./docs/9.x/billing.md:534 +#: ./docs/10.x/billing.md:716 +#: ./docs/11.x/billing.md:713 +#: ./docs/master/billing.md:716 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:507 +#: ./docs/9.x/billing.md:535 +#: ./docs/10.x/billing.md:717 +#: ./docs/11.x/billing.md:714 +#: ./docs/master/billing.md:717 msgid "Retrieving Payment Methods" msgstr "" -#: docs/10.x/billing.md:block 149 (paragraph) +# P +#: ./docs/8.x/billing.md:509 +#: ./docs/9.x/billing.md:537 +#: ./docs/10.x/billing.md:719 +#: ./docs/11.x/billing.md:716 +#: ./docs/master/billing.md:719 msgid "The `paymentMethods` method on the billable model instance returns a collection of `Laravel\\Cashier\\PaymentMethod` instances:" msgstr "" -#: docs/10.x/billing.md:block 150 (code) -msgid "$paymentMethods = $user->paymentMethods();\n" +# CODE +#: ./docs/8.x/billing.md:511 +#: ./docs/9.x/billing.md:539 +#: ./docs/10.x/billing.md:721 +#: ./docs/11.x/billing.md:718 +#: ./docs/master/billing.md:721 +msgid "$paymentMethods = $user->paymentMethods();" msgstr "" -#: docs/10.x/billing.md:block 151 (paragraph) +# P +#: ./docs/8.x/billing.md:513 +#: ./docs/9.x/billing.md:541 msgid "By default, this method will return payment methods of the `card` type. To retrieve payment methods of a different type, you may pass the `type` as an argument to the method:" msgstr "" -#: docs/10.x/billing.md:block 152 (code) -msgid "$paymentMethods = $user->paymentMethods('sepa_debit');\n" +# CODE +#: ./docs/8.x/billing.md:515 +#: ./docs/9.x/billing.md:543 +#: ./docs/10.x/billing.md:725 +#: ./docs/11.x/billing.md:722 +#: ./docs/master/billing.md:725 +msgid "$paymentMethods = $user->paymentMethods('sepa_debit');" msgstr "" -#: docs/10.x/billing.md:block 153 (paragraph) +# P +#: ./docs/8.x/billing.md:517 +#: ./docs/9.x/billing.md:545 +#: ./docs/10.x/billing.md:727 +#: ./docs/11.x/billing.md:724 +#: ./docs/master/billing.md:727 msgid "To retrieve the customer's default payment method, the `defaultPaymentMethod` method may be used:" msgstr "" -#: docs/10.x/billing.md:block 154 (code) -msgid "$paymentMethod = $user->defaultPaymentMethod();\n" +# CODE +#: ./docs/8.x/billing.md:519 +#: ./docs/9.x/billing.md:547 +#: ./docs/10.x/billing.md:729 +#: ./docs/11.x/billing.md:726 +#: ./docs/master/billing.md:729 +msgid "$paymentMethod = $user->defaultPaymentMethod();" msgstr "" -#: docs/10.x/billing.md:block 155 (paragraph) +# P +#: ./docs/8.x/billing.md:521 +#: ./docs/9.x/billing.md:549 +#: ./docs/10.x/billing.md:731 +#: ./docs/11.x/billing.md:728 +#: ./docs/master/billing.md:731 msgid "You can retrieve a specific payment method that is attached to the billable model using the `findPaymentMethod` method:" msgstr "" -#: docs/10.x/billing.md:block 156 (code) -msgid "$paymentMethod = $user->findPaymentMethod($paymentMethodId);\n" +# CODE +#: ./docs/8.x/billing.md:523 +#: ./docs/9.x/billing.md:551 +#: ./docs/10.x/billing.md:733 +#: ./docs/11.x/billing.md:730 +#: ./docs/master/billing.md:733 +msgid "$paymentMethod = $user->findPaymentMethod($paymentMethodId);" msgstr "" -#: docs/10.x/billing.md:block 158 (header) +# P +#: ./docs/8.x/billing.md:525 +#: ./docs/9.x/billing.md:553 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:526 +#: ./docs/9.x/billing.md:554 msgid "Determining If A User Has A Payment Method" msgstr "" -#: docs/10.x/billing.md:block 159 (paragraph) +# P +#: ./docs/8.x/billing.md:528 +#: ./docs/9.x/billing.md:556 +#: ./docs/10.x/billing.md:738 +#: ./docs/11.x/billing.md:735 +#: ./docs/master/billing.md:738 msgid "To determine if a billable model has a default payment method attached to their account, invoke the `hasDefaultPaymentMethod` method:" msgstr "" -#: docs/10.x/billing.md:block 160 (code) +# CODE +#: ./docs/8.x/billing.md:530 +#: ./docs/9.x/billing.md:558 msgid "if ($user->hasDefaultPaymentMethod()) {\n" -" // ...\n" -"}\n" +" //\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 161 (paragraph) +# P +#: ./docs/8.x/billing.md:534 +#: ./docs/9.x/billing.md:562 +#: ./docs/10.x/billing.md:744 +#: ./docs/11.x/billing.md:741 +#: ./docs/master/billing.md:744 msgid "You may use the `hasPaymentMethod` method to determine if a billable model has at least one payment method attached to their account:" msgstr "" -#: docs/10.x/billing.md:block 162 (code) +# CODE +#: ./docs/10.x/billing.md:535 +#: ./docs/11.x/billing.md:532 +#: ./docs/master/billing.md:535 +msgid "use App\\Models\\User;\n" +"use function Illuminate\\Events\\queueable;\n\n" +"/**\n" +" * The \"booted\" method of the model.\n" +" */\n" +"protected static function booted(): void\n" +"{\n" +" static::updated(queueable(function (User $customer) {\n" +" if ($customer->hasStripeId()) {\n" +" $customer->syncStripeCustomerDetails();\n" +" }\n" +" }));\n" +"}" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:536 +#: ./docs/9.x/billing.md:564 msgid "if ($user->hasPaymentMethod()) {\n" -" // ...\n" -"}\n" +" //\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 163 (paragraph) +# P +#: ./docs/8.x/billing.md:540 +#: ./docs/9.x/billing.md:568 msgid "This method will determine if the billable model has payment methods of the `card` type. To determine if a payment method of another type exists for the model, you may pass the `type` as an argument to the method:" msgstr "" -#: docs/10.x/billing.md:block 164 (code) +# CODE +#: ./docs/8.x/billing.md:542 +#: ./docs/9.x/billing.md:570 msgid "if ($user->hasPaymentMethod('sepa_debit')) {\n" -" // ...\n" -"}\n" +" //\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 166 (header) +# P +#: ./docs/8.x/billing.md:546 +#: ./docs/9.x/billing.md:574 +#: ./docs/10.x/billing.md:756 +#: ./docs/11.x/billing.md:753 +#: ./docs/master/billing.md:756 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:547 +#: ./docs/9.x/billing.md:575 msgid "Updating The Default Payment Method" msgstr "" -#: docs/10.x/billing.md:block 167 (paragraph) +# P +#: ./docs/8.x/billing.md:549 +#: ./docs/9.x/billing.md:577 +#: ./docs/10.x/billing.md:759 +#: ./docs/11.x/billing.md:756 +#: ./docs/master/billing.md:759 msgid "The `updateDefaultPaymentMethod` method may be used to update a customer's default payment method information. This method accepts a Stripe payment method identifier and will assign the new payment method as the default billing payment method:" msgstr "" -#: docs/10.x/billing.md:block 168 (code) -msgid "$user->updateDefaultPaymentMethod($paymentMethod);\n" +# CODE +#: ./docs/8.x/billing.md:551 +#: ./docs/9.x/billing.md:579 +#: ./docs/10.x/billing.md:761 +#: ./docs/11.x/billing.md:758 +#: ./docs/master/billing.md:761 +msgid "$user->updateDefaultPaymentMethod($paymentMethod);" msgstr "" -#: docs/10.x/billing.md:block 169 (paragraph) +# P +#: ./docs/8.x/billing.md:553 +#: ./docs/9.x/billing.md:581 +#: ./docs/10.x/billing.md:763 +#: ./docs/11.x/billing.md:760 +#: ./docs/master/billing.md:763 msgid "To sync your default payment method information with the customer's default payment method information in Stripe, you may use the `updateDefaultPaymentMethodFromStripe` method:" msgstr "" -#: docs/10.x/billing.md:block 170 (code) -msgid "$user->updateDefaultPaymentMethodFromStripe();\n" -msgstr "" - -#: docs/10.x/billing.md:block 171 (quote) -msgid "**Warning** The default payment method on a customer can only be used for invoicing and creating new subscriptions. Due to limitations imposed by Stripe, it may not be used for single charges." -msgstr "" - -#: docs/10.x/billing.md:block 173 (header) +# CODE +#: ./docs/10.x/billing.md:554 +#: ./docs/11.x/billing.md:551 +#: ./docs/master/billing.md:554 +msgid "/**\n" +" * Get the customer name that should be synced to Stripe.\n" +" */\n" +"public function stripeName(): string|null\n" +"{\n" +" return $this->company_name;\n" +"}" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:555 +#: ./docs/9.x/billing.md:583 +#: ./docs/10.x/billing.md:765 +#: ./docs/11.x/billing.md:762 +#: ./docs/master/billing.md:765 +msgid "$user->updateDefaultPaymentMethodFromStripe();" +msgstr "" + +# P +#: ./docs/8.x/billing.md:557 +#: ./docs/9.x/billing.md:586 +#: ./docs/10.x/billing.md:768 +#: ./docs/11.x/billing.md:765 +#: ./docs/master/billing.md:768 +msgid "The default payment method on a customer can only be used for invoicing and creating new subscriptions. Due to limitations imposed by Stripe, it may not be used for single charges." +msgstr "" + +# P +#: ./docs/8.x/billing.md:559 +#: ./docs/9.x/billing.md:588 +#: ./docs/10.x/billing.md:770 +#: ./docs/11.x/billing.md:767 +#: ./docs/master/billing.md:770 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:560 +#: ./docs/9.x/billing.md:589 +#: ./docs/10.x/billing.md:771 +#: ./docs/11.x/billing.md:768 +#: ./docs/master/billing.md:771 msgid "Adding Payment Methods" msgstr "" -#: docs/10.x/billing.md:block 174 (paragraph) +# P +#: ./docs/8.x/billing.md:562 +#: ./docs/9.x/billing.md:591 +#: ./docs/10.x/billing.md:773 +#: ./docs/11.x/billing.md:770 +#: ./docs/master/billing.md:773 msgid "To add a new payment method, you may call the `addPaymentMethod` method on the billable model, passing the payment method identifier:" msgstr "" -#: docs/10.x/billing.md:block 175 (code) -msgid "$user->addPaymentMethod($paymentMethod);\n" -msgstr "" - -#: docs/10.x/billing.md:block 176 (quote) -msgid "**Note** To learn how to retrieve payment method identifiers please review the [payment method storage documentation](#storing-payment-methods)." -msgstr "" - -#: docs/10.x/billing.md:block 178 (header) +# CODE +#: ./docs/8.x/billing.md:564 +#: ./docs/9.x/billing.md:593 +#: ./docs/10.x/billing.md:775 +#: ./docs/11.x/billing.md:772 +#: ./docs/master/billing.md:775 +msgid "$user->addPaymentMethod($paymentMethod);" +msgstr "" + +# P +#: ./docs/8.x/billing.md:566 +#: ./docs/9.x/billing.md:596 +#: ./docs/10.x/billing.md:778 +#: ./docs/11.x/billing.md:775 +#: ./docs/master/billing.md:778 +msgid "To learn how to retrieve payment method identifiers please review the [payment method storage documentation](#storing-payment-methods)." +msgstr "" + +# P +#: ./docs/8.x/billing.md:568 +#: ./docs/9.x/billing.md:598 +#: ./docs/10.x/billing.md:780 +#: ./docs/11.x/billing.md:777 +#: ./docs/master/billing.md:780 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:569 +#: ./docs/9.x/billing.md:599 +#: ./docs/10.x/billing.md:781 +#: ./docs/11.x/billing.md:778 +#: ./docs/master/billing.md:781 msgid "Deleting Payment Methods" msgstr "" -#: docs/10.x/billing.md:block 179 (paragraph) +# P +#: ./docs/8.x/billing.md:571 +#: ./docs/9.x/billing.md:601 +#: ./docs/10.x/billing.md:783 +#: ./docs/11.x/billing.md:780 +#: ./docs/master/billing.md:783 msgid "To delete a payment method, you may call the `delete` method on the `Laravel\\Cashier\\PaymentMethod` instance you wish to delete:" msgstr "" -#: docs/10.x/billing.md:block 180 (code) -msgid "$paymentMethod->delete();\n" +# CODE +#: ./docs/8.x/billing.md:573 +#: ./docs/9.x/billing.md:603 +#: ./docs/10.x/billing.md:785 +#: ./docs/11.x/billing.md:782 +#: ./docs/master/billing.md:785 +msgid "$paymentMethod->delete();" msgstr "" -#: docs/10.x/billing.md:block 181 (paragraph) +# P +#: ./docs/8.x/billing.md:575 +#: ./docs/9.x/billing.md:605 +#: ./docs/10.x/billing.md:787 +#: ./docs/11.x/billing.md:784 +#: ./docs/master/billing.md:787 msgid "The `deletePaymentMethod` method will delete a specific payment method from the billable model:" msgstr "" -#: docs/10.x/billing.md:block 182 (code) -msgid "$user->deletePaymentMethod('pm_visa');\n" +# CODE +#: ./docs/8.x/billing.md:577 +#: ./docs/9.x/billing.md:607 +#: ./docs/10.x/billing.md:789 +#: ./docs/11.x/billing.md:786 +#: ./docs/master/billing.md:789 +msgid "$user->deletePaymentMethod('pm_visa');" msgstr "" -#: docs/10.x/billing.md:block 183 (paragraph) +# P +#: ./docs/8.x/billing.md:579 +#: ./docs/9.x/billing.md:609 +#: ./docs/10.x/billing.md:791 +#: ./docs/11.x/billing.md:788 +#: ./docs/master/billing.md:791 msgid "The `deletePaymentMethods` method will delete all of the payment method information for the billable model:" msgstr "" -#: docs/10.x/billing.md:block 184 (code) -msgid "$user->deletePaymentMethods();\n" +# CODE +#: ./docs/8.x/billing.md:581 +#: ./docs/9.x/billing.md:611 +#: ./docs/10.x/billing.md:793 +#: ./docs/11.x/billing.md:790 +#: ./docs/master/billing.md:793 +msgid "$user->deletePaymentMethods();" msgstr "" -#: docs/10.x/billing.md:block 185 (paragraph) +# P +#: ./docs/8.x/billing.md:583 +#: ./docs/9.x/billing.md:613 msgid "By default, this method will delete payment methods of the `card` type. To delete payment methods of a different type you can pass the `type` as an argument to the method:" msgstr "" -#: docs/10.x/billing.md:block 186 (code) -msgid "$user->deletePaymentMethods('sepa_debit');\n" -msgstr "" - -#: docs/10.x/billing.md:block 187 (quote) -msgid "**Warning** If a user has an active subscription, your application should not allow them to delete their default payment method." -msgstr "" - -#: docs/10.x/billing.md:block 189 (header) +# CODE +#: ./docs/8.x/billing.md:585 +#: ./docs/9.x/billing.md:615 +#: ./docs/10.x/billing.md:797 +#: ./docs/11.x/billing.md:794 +#: ./docs/master/billing.md:797 +msgid "$user->deletePaymentMethods('sepa_debit');" +msgstr "" + +# P +#: ./docs/8.x/billing.md:587 +#: ./docs/9.x/billing.md:618 +#: ./docs/10.x/billing.md:800 +#: ./docs/11.x/billing.md:797 +#: ./docs/master/billing.md:800 +msgid "If a user has an active subscription, your application should not allow them to delete their default payment method." +msgstr "" + +# P +#: ./docs/8.x/billing.md:589 +#: ./docs/9.x/billing.md:620 +#: ./docs/10.x/billing.md:802 +#: ./docs/11.x/billing.md:799 +#: ./docs/master/billing.md:802 +#~ msgid "" +#~ msgstr "" + +# H2 +#: ./docs/8.x/billing.md:590 +#: ./docs/9.x/billing.md:621 +#: ./docs/10.x/billing.md:803 +#: ./docs/11.x/billing.md:800 +#: ./docs/master/billing.md:803 msgid "Subscriptions" msgstr "" -#: docs/10.x/billing.md:block 190 (paragraph) +# P +#: ./docs/8.x/billing.md:592 +#: ./docs/9.x/billing.md:623 +#: ./docs/10.x/billing.md:805 +#: ./docs/11.x/billing.md:802 +#: ./docs/master/billing.md:805 msgid "Subscriptions provide a way to set up recurring payments for your customers. Stripe subscriptions managed by Cashier provide support for multiple subscription prices, subscription quantities, trials, and more." msgstr "" -#: docs/10.x/billing.md:block 192 (header) +# P +#: ./docs/8.x/billing.md:594 +#: ./docs/9.x/billing.md:625 +#: ./docs/10.x/billing.md:807 +#: ./docs/11.x/billing.md:804 +#: ./docs/master/billing.md:807 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:595 +#: ./docs/9.x/billing.md:626 +#: ./docs/10.x/billing.md:808 +#: ./docs/11.x/billing.md:805 +#: ./docs/master/billing.md:808 msgid "Creating Subscriptions" msgstr "" -#: docs/10.x/billing.md:block 193 (paragraph) +# H4 +#: ./docs/10.x/billing.md:596 +#: ./docs/11.x/billing.md:593 +#: ./docs/master/billing.md:596 +msgid "Payment Methods for Subscriptions" +msgstr "" + +# P +#: ./docs/8.x/billing.md:597 +#: ./docs/9.x/billing.md:628 +#: ./docs/10.x/billing.md:810 +#: ./docs/11.x/billing.md:807 +#: ./docs/master/billing.md:810 msgid "To create a subscription, first retrieve an instance of your billable model, which typically will be an instance of `App\\Models\\User`. Once you have retrieved the model instance, you may use the `newSubscription` method to create the model's subscription:" msgstr "" -#: docs/10.x/billing.md:block 194 (code) +# CODE +#: ./docs/8.x/billing.md:599 +#: ./docs/9.x/billing.md:630 +#: ./docs/10.x/billing.md:812 +#: ./docs/11.x/billing.md:809 +#: ./docs/master/billing.md:812 msgid "use Illuminate\\Http\\Request;\n\n" "Route::post('/user/subscribe', function (Request $request) {\n" " $request->user()->newSubscription(\n" " 'default', 'price_monthly'\n" " )->create($request->paymentMethodId);\n\n" " // ...\n" -"});\n" +"});" msgstr "" -#: docs/10.x/billing.md:block 195 (paragraph) +# P +#: ./docs/8.x/billing.md:609 +#: ./docs/9.x/billing.md:640 msgid "The first argument passed to the `newSubscription` method should be the internal name of the subscription. If your application only offers a single subscription, you might call this `default` or `primary`. This subscription name is only for internal application usage and is not meant to be shown to users. In addition, it should not contain spaces and it should never be changed after creating the subscription. The second argument is the specific price the user is subscribing to. This value should correspond to the price's identifier in Stripe." msgstr "" -#: docs/10.x/billing.md:block 196 (paragraph) +# P +#: ./docs/8.x/billing.md:611 +#: ./docs/9.x/billing.md:642 +#: ./docs/10.x/billing.md:824 +#: ./docs/11.x/billing.md:821 +#: ./docs/master/billing.md:824 msgid "The `create` method, which accepts [a Stripe payment method identifier](#storing-payment-methods) or Stripe `PaymentMethod` object, will begin the subscription as well as update your database with the billable model's Stripe customer ID and other relevant billing information." msgstr "" -#: docs/10.x/billing.md:block 197 (quote) -msgid "**Warning** Passing a payment method identifier directly to the `create` subscription method will also automatically add it to the user's stored payment methods." +# P +#: ./docs/8.x/billing.md:613 +#: ./docs/9.x/billing.md:645 +#: ./docs/10.x/billing.md:827 +#: ./docs/11.x/billing.md:824 +#: ./docs/master/billing.md:827 +msgid "Passing a payment method identifier directly to the `create` subscription method will also automatically add it to the user's stored payment methods." msgstr "" -#: docs/10.x/billing.md:block 199 (header) +# P +#: ./docs/8.x/billing.md:615 +#: ./docs/9.x/billing.md:647 +#: ./docs/10.x/billing.md:829 +#: ./docs/11.x/billing.md:826 +#: ./docs/master/billing.md:829 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:616 +#: ./docs/9.x/billing.md:648 msgid "Collecting Recurring Payments Via Invoice Emails" msgstr "" -#: docs/10.x/billing.md:block 200 (paragraph) +# P +#: ./docs/8.x/billing.md:618 +#: ./docs/9.x/billing.md:650 +#: ./docs/10.x/billing.md:832 +#: ./docs/11.x/billing.md:829 +#: ./docs/master/billing.md:832 msgid "Instead of collecting a customer's recurring payments automatically, you may instruct Stripe to email an invoice to the customer each time their recurring payment is due. Then, the customer may manually pay the invoice once they receive it. The customer does not need to provide a payment method up front when collecting recurring payments via invoices:" msgstr "" -#: docs/10.x/billing.md:block 201 (code) -msgid "$user->newSubscription('default', 'price_monthly')->createAndSendInvoice();\n" -msgstr "" - -#: docs/10.x/billing.md:block 202 (paragraph) -msgid "The amount of time a customer has to pay their invoice before their subscription is cancelled is determined by the `days_until_due` option. By default, this is 30 days; however, you may provide a specific value for this option if you wish:" +# CODE +#: ./docs/8.x/billing.md:620 +#: ./docs/9.x/billing.md:652 +#: ./docs/10.x/billing.md:834 +#: ./docs/11.x/billing.md:831 +#: ./docs/master/billing.md:834 +msgid "$user->newSubscription('default', 'price_monthly')->createAndSendInvoice();" msgstr "" -#: docs/10.x/billing.md:block 203 (code) -msgid "$user->newSubscription('default', 'price_monthly')->createAndSendInvoice([], [\n" -" 'days_until_due' => 30\n" -"]);\n" +# P +#: ./docs/8.x/billing.md:622 +msgid "The amount of time a customer has to pay their invoice before their subscription is canceled is determined by your subscription and invoice settings within the [Stripe dashboard](https://dashboard.stripe.com/settings/billing/automatic)." msgstr "" -#: docs/10.x/billing.md:block 205 (header) +# P +#: ./docs/8.x/billing.md:624 +#: ./docs/9.x/billing.md:660 +#: ./docs/10.x/billing.md:842 +#: ./docs/11.x/billing.md:839 +#: ./docs/master/billing.md:842 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:625 +#: ./docs/8.x/billing.md:991 +#: ./docs/9.x/billing.md:661 +#: ./docs/9.x/billing.md:1074 +#: ./docs/10.x/billing.md:843 +#: ./docs/10.x/billing.md:1254 +#: ./docs/11.x/billing.md:840 +#: ./docs/11.x/billing.md:1251 +#: ./docs/master/billing.md:843 +#: ./docs/master/billing.md:1254 msgid "Quantities" msgstr "" -#: docs/10.x/billing.md:block 206 (paragraph) +# P +#: ./docs/8.x/billing.md:627 +#: ./docs/9.x/billing.md:663 +#: ./docs/10.x/billing.md:845 +#: ./docs/11.x/billing.md:842 +#: ./docs/master/billing.md:845 msgid "If you would like to set a specific [quantity](https://stripe.com/docs/billing/subscriptions/quantities) for the price when creating the subscription, you should invoke the `quantity` method on the subscription builder before creating the subscription:" msgstr "" -#: docs/10.x/billing.md:block 207 (code) +# CODE +#: ./docs/8.x/billing.md:629 +#: ./docs/9.x/billing.md:665 +#: ./docs/10.x/billing.md:847 +#: ./docs/11.x/billing.md:844 +#: ./docs/master/billing.md:847 msgid "$user->newSubscription('default', 'price_monthly')\n" " ->quantity(5)\n" -" ->create($paymentMethod);\n" -msgstr "" - -#: docs/10.x/billing.md:block 209 (header) +" ->create($paymentMethod);" +msgstr "" + +# P +#: ./docs/8.x/billing.md:633 +#: ./docs/9.x/billing.md:669 +#: ./docs/10.x/billing.md:851 +#: ./docs/11.x/billing.md:848 +#: ./docs/master/billing.md:851 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:634 +#: ./docs/9.x/billing.md:670 +#: ./docs/10.x/billing.md:852 +#: ./docs/11.x/billing.md:849 +#: ./docs/master/billing.md:852 msgid "Additional Details" msgstr "" -#: docs/10.x/billing.md:block 210 (paragraph) +# P +#: ./docs/8.x/billing.md:636 +#: ./docs/9.x/billing.md:672 +#: ./docs/10.x/billing.md:854 +#: ./docs/11.x/billing.md:851 +#: ./docs/master/billing.md:854 msgid "If you would like to specify additional [customer](https://stripe.com/docs/api/customers/create) or [subscription](https://stripe.com/docs/api/subscriptions/create) options supported by Stripe, you may do so by passing them as the second and third arguments to the `create` method:" msgstr "" -#: docs/10.x/billing.md:block 211 (code) +# CODE +#: ./docs/8.x/billing.md:638 +#: ./docs/9.x/billing.md:674 +#: ./docs/10.x/billing.md:856 +#: ./docs/11.x/billing.md:853 +#: ./docs/master/billing.md:856 msgid "$user->newSubscription('default', 'price_monthly')->create($paymentMethod, [\n" " 'email' => $email,\n" "], [\n" " 'metadata' => ['note' => 'Some extra information.'],\n" -"]);\n" -msgstr "" - -#: docs/10.x/billing.md:block 213 (header) +"]);" +msgstr "" + +# P +#: ./docs/8.x/billing.md:644 +#: ./docs/9.x/billing.md:680 +#: ./docs/10.x/billing.md:862 +#: ./docs/11.x/billing.md:859 +#: ./docs/master/billing.md:862 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:645 +#: ./docs/9.x/billing.md:681 +#: ./docs/10.x/billing.md:863 +#: ./docs/11.x/billing.md:860 +#: ./docs/master/billing.md:863 msgid "Coupons" msgstr "" -#: docs/10.x/billing.md:block 214 (paragraph) +# P +#: ./docs/8.x/billing.md:647 +#: ./docs/9.x/billing.md:683 +#: ./docs/10.x/billing.md:865 +#: ./docs/11.x/billing.md:862 +#: ./docs/master/billing.md:865 msgid "If you would like to apply a coupon when creating the subscription, you may use the `withCoupon` method:" msgstr "" -#: docs/10.x/billing.md:block 215 (code) +# CODE +#: ./docs/8.x/billing.md:649 +#: ./docs/9.x/billing.md:685 +#: ./docs/10.x/billing.md:867 +#: ./docs/11.x/billing.md:864 +#: ./docs/master/billing.md:867 msgid "$user->newSubscription('default', 'price_monthly')\n" " ->withCoupon('code')\n" -" ->create($paymentMethod);\n" -msgstr "" - -#: docs/10.x/billing.md:block 216 (paragraph) -msgid "Or, if you would like to apply a [Stripe promotion code](https://stripe.com/docs/billing/subscriptions/discounts/codes), you may use the `withPromotionCode` method:" -msgstr "" - -#: docs/10.x/billing.md:block 217 (code) -msgid "$user->newSubscription('default', 'price_monthly')\n" -" ->withPromotionCode('promo_code_id')\n" -" ->create($paymentMethod);\n" -msgstr "" - -#: docs/10.x/billing.md:block 218 (paragraph) -msgid "The given promotion code ID should be the Stripe API ID assigned to the promotion code and not the customer facing promotion code. If you need to find a promotion code ID based on a given customer facing promotion code, you may use the `findPromotionCode` method:" -msgstr "" - -#: docs/10.x/billing.md:block 219 (code) -msgid "// Find a promotion code ID by its customer facing code...\n" -"$promotionCode = $user->findPromotionCode('SUMMERSALE');\n\n" -"// Find an active promotion code ID by its customer facing code...\n" -"$promotionCode = $user->findActivePromotionCode('SUMMERSALE');\n" -msgstr "" - -#: docs/10.x/billing.md:block 220 (paragraph) -msgid "In the example above, the returned `$promotionCode` object is an instance of `Laravel\\Cashier\\PromotionCode`. This class decorates an underlying `Stripe\\PromotionCode` object. You can retrieve the coupon related to the promotion code by invoking the `coupon` method:" -msgstr "" - -#: docs/10.x/billing.md:block 221 (code) -msgid "$coupon = $user->findPromotionCode('SUMMERSALE')->coupon();\n" -msgstr "" - -#: docs/10.x/billing.md:block 222 (paragraph) -msgid "The coupon instance allows you to determine the discount amount and whether the coupon represents a fixed discount or percentage based discount:" -msgstr "" - -#: docs/10.x/billing.md:block 223 (code) -msgid "if ($coupon->isPercentage()) {\n" -" return $coupon->percentOff().'%'; // 21.5%\n" -"} else {\n" -" return $coupon->amountOff(); // $5.99\n" -"}\n" -msgstr "" - -#: docs/10.x/billing.md:block 224 (paragraph) -msgid "You can also retrieve the discounts that are currently applied to a customer or subscription:" -msgstr "" - -#: docs/10.x/billing.md:block 225 (code) -msgid "$discount = $billable->discount();\n\n" -"$discount = $subscription->discount();\n" -msgstr "" - -#: docs/10.x/billing.md:block 226 (paragraph) -msgid "The returned `Laravel\\Cashier\\Discount` instances decorate an underlying `Stripe\\Discount` object instance. You may retrieve the coupon related to this discount by invoking the `coupon` method:" -msgstr "" - -#: docs/10.x/billing.md:block 227 (code) -msgid "$coupon = $subscription->discount()->coupon();\n" -msgstr "" - -#: docs/10.x/billing.md:block 228 (paragraph) -msgid "If you would like to apply a new coupon or promotion code to a customer or subscription, you may do so via the `applyCoupon` or `applyPromotionCode` methods:" +" ->create($paymentMethod);" msgstr "" -#: docs/10.x/billing.md:block 229 (code) -msgid "$billable->applyCoupon('coupon_id');\n" -"$billable->applyPromotionCode('promotion_code_id');\n\n" -"$subscription->applyCoupon('coupon_id');\n" -"$subscription->applyPromotionCode('promotion_code_id');\n" +# P +#: ./docs/8.x/billing.md:653 +msgid "Or, if you would like to apply a [Stripe promotion code](https://stripe.com/docs/billing/subscriptions/discounts/codes), you may use the `withPromotionCode` method. The given promotion code ID should be the Stripe API ID assigned to the promotion code and not the customer facing promotion code:" msgstr "" -#: docs/10.x/billing.md:block 230 (paragraph) -msgid "Remember, you should use the Stripe API ID assigned to the promotion code and not the customer facing promotion code. Only one coupon or promotion code can be applied to a customer or subscription at a given time." +# P +#: ./docs/9.x/billing.md:654 +#: ./docs/10.x/billing.md:836 +#: ./docs/master/billing.md:836 +msgid "The amount of time a customer has to pay their invoice before their subscription is cancelled is determined by the `days_until_due` option. By default, this is 30 days; however, you may provide a specific value for this option if you wish:" msgstr "" -#: docs/10.x/billing.md:block 231 (paragraph) -msgid "For more info on this subject, please consult the Stripe documentation regarding [coupons](https://stripe.com/docs/billing/subscriptions/coupons) and [promotion codes](https://stripe.com/docs/billing/subscriptions/coupons/codes)." +# CODE +#: ./docs/8.x/billing.md:655 +msgid "$user->newSubscription('default', 'price_monthly')\n" +" ->withPromotionCode('promo_code')\n" +" ->create($paymentMethod);" msgstr "" -#: docs/10.x/billing.md:block 233 (header) +# CODE +#: ./docs/9.x/billing.md:656 +#: ./docs/10.x/billing.md:838 +#: ./docs/11.x/billing.md:835 +#: ./docs/master/billing.md:838 +msgid "$user->newSubscription('default', 'price_monthly')->createAndSendInvoice([], [\n" +" 'days_until_due' => 30\n" +"]);" +msgstr "" + +# P +#: ./docs/8.x/billing.md:659 +#: ./docs/9.x/billing.md:737 +#: ./docs/10.x/billing.md:919 +#: ./docs/11.x/billing.md:916 +#: ./docs/master/billing.md:919 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:660 +#: ./docs/9.x/billing.md:738 +#: ./docs/10.x/billing.md:920 +#: ./docs/11.x/billing.md:917 +#: ./docs/master/billing.md:920 msgid "Adding Subscriptions" msgstr "" -#: docs/10.x/billing.md:block 234 (paragraph) +# P +#: ./docs/8.x/billing.md:662 +#: ./docs/9.x/billing.md:740 +#: ./docs/10.x/billing.md:922 +#: ./docs/11.x/billing.md:919 +#: ./docs/master/billing.md:922 msgid "If you would like to add a subscription to a customer who already has a default payment method you may invoke the `add` method on the subscription builder:" msgstr "" -#: docs/10.x/billing.md:block 235 (code) +# H4 +#: ./docs/10.x/billing.md:663 +#: ./docs/11.x/billing.md:660 +#: ./docs/master/billing.md:663 +msgid "Payment Methods for Single Charges" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:664 +#: ./docs/9.x/billing.md:742 +#: ./docs/10.x/billing.md:924 +#: ./docs/11.x/billing.md:921 +#: ./docs/master/billing.md:924 msgid "use App\\Models\\User;\n\n" "$user = User::find(1);\n\n" -"$user->newSubscription('default', 'price_monthly')->add();\n" +"$user->newSubscription('default', 'price_monthly')->add();" msgstr "" -#: docs/10.x/billing.md:block 237 (header) +# P +#: ./docs/8.x/billing.md:670 +#: ./docs/9.x/billing.md:748 +#: ./docs/10.x/billing.md:930 +#: ./docs/11.x/billing.md:927 +#: ./docs/master/billing.md:930 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:671 +#: ./docs/9.x/billing.md:749 msgid "Creating Subscriptions From The Stripe Dashboard" msgstr "" -#: docs/10.x/billing.md:block 238 (paragraph) -msgid "You may also create subscriptions from the Stripe dashboard itself. When doing so, Cashier will sync newly added subscriptions and assign them a name of `default`. To customize the subscription name that is assigned to dashboard created subscriptions, [extend the `WebhookController`](#defining-webhook-event-handlers) and overwrite the `newSubscriptionName` method." +# P +#: ./docs/8.x/billing.md:673 +msgid "You may also create subscriptions from the Stripe dashboard itself. When doing so, Cashier will sync newly added subscriptions and assign them a name of `default`. To customize the subscription name that is assigned to dashboard created subscriptions, [extend the `WebhookController`](/docs/{{version}}/billing#defining-webhook-event-handlers) and overwrite the `newSubscriptionName` method." msgstr "" -#: docs/10.x/billing.md:block 239 (paragraph) +# P +#: ./docs/8.x/billing.md:675 +#: ./docs/9.x/billing.md:753 msgid "In addition, you may only create one type of subscription via the Stripe dashboard. If your application offers multiple subscriptions that use different names, only one type of subscription may be added through the Stripe dashboard." msgstr "" -#: docs/10.x/billing.md:block 240 (paragraph) -msgid "Finally, you should always make sure to only add one active subscription per type of subscription offered by your application. If a customer has two `default` subscriptions, only the most recently added subscription will be used by Cashier even though both would be synced with your application's database." +# P +#: ./docs/8.x/billing.md:677 +msgid "Finally, you should always make sure to only add one active subscription per type of subscription offered by your application. If customer has two `default` subscriptions, only the most recently added subscription will be used by Cashier even though both would be synced with your application's database." msgstr "" -#: docs/10.x/billing.md:block 242 (header) +# P +#: ./docs/8.x/billing.md:679 +#: ./docs/9.x/billing.md:757 +#: ./docs/10.x/billing.md:939 +#: ./docs/11.x/billing.md:936 +#: ./docs/master/billing.md:939 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:680 +#: ./docs/9.x/billing.md:758 +#: ./docs/10.x/billing.md:940 +#: ./docs/11.x/billing.md:937 +#: ./docs/master/billing.md:940 msgid "Checking Subscription Status" msgstr "" -#: docs/10.x/billing.md:block 243 (paragraph) +# P +#: ./docs/8.x/billing.md:682 +#: ./docs/9.x/billing.md:760 msgid "Once a customer is subscribed to your application, you may easily check their subscription status using a variety of convenient methods. First, the `subscribed` method returns `true` if the customer has an active subscription, even if the subscription is currently within its trial period. The `subscribed` method accepts the name of the subscription as its first argument:" msgstr "" -#: docs/10.x/billing.md:block 244 (code) +# CODE +#: ./docs/8.x/billing.md:684 +#: ./docs/9.x/billing.md:762 msgid "if ($user->subscribed('default')) {\n" -" // ...\n" -"}\n" +" //\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 245 (paragraph) +# P +#: ./docs/8.x/billing.md:688 +#: ./docs/9.x/billing.md:766 +#: ./docs/10.x/billing.md:948 +#: ./docs/11.x/billing.md:945 +#: ./docs/master/billing.md:948 msgid "The `subscribed` method also makes a great candidate for a [route middleware](/docs/{{version}}/middleware), allowing you to filter access to routes and controllers based on the user's subscription status:" msgstr "" -#: docs/10.x/billing.md:block 246 (code) +# P +#: ./docs/9.x/billing.md:689 +#: ./docs/10.x/billing.md:871 +#: ./docs/11.x/billing.md:868 +#: ./docs/master/billing.md:871 +msgid "Or, if you would like to apply a [Stripe promotion code](https://stripe.com/docs/billing/subscriptions/discounts/codes), you may use the `withPromotionCode` method:" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:690 +#: ./docs/9.x/billing.md:768 msgid "user() && ! $request->user()->subscribed('default')) {\n" " // This user is not a paying customer...\n" @@ -1289,168 +3396,537 @@ msgid "newSubscription('default', 'price_monthly')\n" +" ->withPromotionCode('promo_code_id')\n" +" ->create($paymentMethod);" +msgstr "" + +# P +#: ./docs/9.x/billing.md:695 +#: ./docs/10.x/billing.md:877 +#: ./docs/11.x/billing.md:874 +#: ./docs/master/billing.md:877 +msgid "The given promotion code ID should be the Stripe API ID assigned to the promotion code and not the customer facing promotion code. If you need to find a promotion code ID based on a given customer facing promotion code, you may use the `findPromotionCode` method:" +msgstr "" + +# CODE +#: ./docs/9.x/billing.md:697 +#: ./docs/10.x/billing.md:879 +#: ./docs/11.x/billing.md:876 +#: ./docs/master/billing.md:879 +msgid "// Find a promotion code ID by its customer facing code...\n" +"$promotionCode = $user->findPromotionCode('SUMMERSALE');\n\n" +"// Find an active promotion code ID by its customer facing code...\n" +"$promotionCode = $user->findActivePromotionCode('SUMMERSALE');" +msgstr "" + +# P +#: ./docs/9.x/billing.md:703 +#: ./docs/10.x/billing.md:885 +#: ./docs/11.x/billing.md:882 +#: ./docs/master/billing.md:885 +msgid "In the example above, the returned `$promotionCode` object is an instance of `Laravel\\Cashier\\PromotionCode`. This class decorates an underlying `Stripe\\PromotionCode` object. You can retrieve the coupon related to the promotion code by invoking the `coupon` method:" +msgstr "" + +# CODE +#: ./docs/9.x/billing.md:705 +#: ./docs/10.x/billing.md:887 +#: ./docs/11.x/billing.md:884 +#: ./docs/master/billing.md:887 +msgid "$coupon = $user->findPromotionCode('SUMMERSALE')->coupon();" +msgstr "" + +# P +#: ./docs/9.x/billing.md:707 +#: ./docs/10.x/billing.md:889 +#: ./docs/11.x/billing.md:886 +#: ./docs/master/billing.md:889 +msgid "The coupon instance allows you to determine the discount amount and whether the coupon represents a fixed discount or percentage based discount:" +msgstr "" + +# CODE +#: ./docs/9.x/billing.md:709 +#: ./docs/10.x/billing.md:891 +#: ./docs/11.x/billing.md:888 +#: ./docs/master/billing.md:891 +msgid "if ($coupon->isPercentage()) {\n" +" return $coupon->percentOff().'%'; // 21.5%\n" +"} else {\n" +" return $coupon->amountOff(); // $5.99\n" +"}" +msgstr "" + +# P +#: ./docs/9.x/billing.md:715 +#: ./docs/10.x/billing.md:897 +#: ./docs/11.x/billing.md:894 +#: ./docs/master/billing.md:897 +msgid "You can also retrieve the discounts that are currently applied to a customer or subscription:" msgstr "" -#: docs/10.x/billing.md:block 247 (paragraph) +# P +#: ./docs/8.x/billing.md:716 +#: ./docs/9.x/billing.md:794 +#: ./docs/10.x/billing.md:976 +#: ./docs/11.x/billing.md:973 +#: ./docs/master/billing.md:976 msgid "If you would like to determine if a user is still within their trial period, you may use the `onTrial` method. This method can be useful for determining if you should display a warning to the user that they are still on their trial period:" msgstr "" -#: docs/10.x/billing.md:block 248 (code) +# CODE +#: ./docs/9.x/billing.md:717 +#: ./docs/10.x/billing.md:899 +#: ./docs/11.x/billing.md:896 +#: ./docs/master/billing.md:899 +msgid "$discount = $billable->discount();\n\n" +"$discount = $subscription->discount();" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:718 +#: ./docs/9.x/billing.md:796 msgid "if ($user->subscription('default')->onTrial()) {\n" -" // ...\n" -"}\n" +" //\n" +"}" +msgstr "" + +# P +#: ./docs/9.x/billing.md:721 +#: ./docs/10.x/billing.md:903 +#: ./docs/11.x/billing.md:900 +#: ./docs/master/billing.md:903 +msgid "The returned `Laravel\\Cashier\\Discount` instances decorate an underlying `Stripe\\Discount` object instance. You may retrieve the coupon related to this discount by invoking the `coupon` method:" msgstr "" -#: docs/10.x/billing.md:block 249 (paragraph) +# P +#: ./docs/8.x/billing.md:722 +#: ./docs/9.x/billing.md:800 +#: ./docs/10.x/billing.md:982 +#: ./docs/11.x/billing.md:979 +#: ./docs/master/billing.md:982 msgid "The `subscribedToProduct` method may be used to determine if the user is subscribed to a given product based on a given Stripe product's identifier. In Stripe, products are collections of prices. In this example, we will determine if the user's `default` subscription is actively subscribed to the application's \"premium\" product. The given Stripe product identifier should correspond to one of your product's identifiers in the Stripe dashboard:" msgstr "" -#: docs/10.x/billing.md:block 250 (code) +# P +#: ./docs/10.x/billing.md:723 +#: ./docs/11.x/billing.md:720 +#: ./docs/master/billing.md:723 +msgid "By default, this method will return payment methods of every type. To retrieve payment methods of a specific type, you may pass the `type` as an argument to the method:" +msgstr "" + +# CODE +#: ./docs/9.x/billing.md:723 +#: ./docs/10.x/billing.md:905 +#: ./docs/11.x/billing.md:902 +#: ./docs/master/billing.md:905 +msgid "$coupon = $subscription->discount()->coupon();" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:724 +#: ./docs/9.x/billing.md:802 msgid "if ($user->subscribedToProduct('prod_premium', 'default')) {\n" -" // ...\n" -"}\n" +" //\n" +"}" +msgstr "" + +# P +#: ./docs/9.x/billing.md:725 +#: ./docs/10.x/billing.md:907 +#: ./docs/11.x/billing.md:904 +#: ./docs/master/billing.md:907 +msgid "If you would like to apply a new coupon or promotion code to a customer or subscription, you may do so via the `applyCoupon` or `applyPromotionCode` methods:" +msgstr "" + +# CODE +#: ./docs/9.x/billing.md:727 +#: ./docs/10.x/billing.md:909 +#: ./docs/11.x/billing.md:906 +#: ./docs/master/billing.md:909 +msgid "$billable->applyCoupon('coupon_id');\n" +"$billable->applyPromotionCode('promotion_code_id');\n\n" +"$subscription->applyCoupon('coupon_id');\n" +"$subscription->applyPromotionCode('promotion_code_id');" msgstr "" -#: docs/10.x/billing.md:block 251 (paragraph) +# P +#: ./docs/8.x/billing.md:728 +#: ./docs/9.x/billing.md:806 +#: ./docs/10.x/billing.md:988 +#: ./docs/11.x/billing.md:985 +#: ./docs/master/billing.md:988 msgid "By passing an array to the `subscribedToProduct` method, you may determine if the user's `default` subscription is actively subscribed to the application's \"basic\" or \"premium\" product:" msgstr "" -#: docs/10.x/billing.md:block 252 (code) +# CODE +#: ./docs/8.x/billing.md:730 +#: ./docs/9.x/billing.md:808 msgid "if ($user->subscribedToProduct(['prod_basic', 'prod_premium'], 'default')) {\n" -" // ...\n" -"}\n" +" //\n" +"}" +msgstr "" + +# P +#: ./docs/9.x/billing.md:733 +#: ./docs/10.x/billing.md:915 +#: ./docs/11.x/billing.md:912 +#: ./docs/master/billing.md:915 +msgid "Remember, you should use the Stripe API ID assigned to the promotion code and not the customer facing promotion code. Only one coupon or promotion code can be applied to a customer or subscription at a given time." msgstr "" -#: docs/10.x/billing.md:block 253 (paragraph) +# P +#: ./docs/8.x/billing.md:734 +#: ./docs/9.x/billing.md:812 +#: ./docs/10.x/billing.md:994 +#: ./docs/11.x/billing.md:991 +#: ./docs/master/billing.md:994 msgid "The `subscribedToPrice` method may be used to determine if a customer's subscription corresponds to a given price ID:" msgstr "" -#: docs/10.x/billing.md:block 254 (code) +# P +#: ./docs/10.x/billing.md:735 +#: ./docs/11.x/billing.md:732 +#: ./docs/master/billing.md:735 +#~ msgid "" +#~ msgstr "" + +# P +#: ./docs/9.x/billing.md:735 +#: ./docs/10.x/billing.md:917 +#: ./docs/11.x/billing.md:914 +#: ./docs/master/billing.md:917 +msgid "For more info on this subject, please consult the Stripe documentation regarding [coupons](https://stripe.com/docs/billing/subscriptions/coupons) and [promotion codes](https://stripe.com/docs/billing/subscriptions/coupons/codes)." +msgstr "" + +# H3 +#: ./docs/10.x/billing.md:736 +#: ./docs/11.x/billing.md:733 +#: ./docs/master/billing.md:736 +msgid "Payment Method Presence" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:736 +#: ./docs/9.x/billing.md:814 msgid "if ($user->subscribedToPrice('price_basic_monthly', 'default')) {\n" +" //\n" +"}" +msgstr "" + +# CODE +#: ./docs/10.x/billing.md:740 +#: ./docs/11.x/billing.md:737 +#: ./docs/master/billing.md:740 +msgid "if ($user->hasDefaultPaymentMethod()) {\n" " // ...\n" -"}\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 255 (paragraph) +# P +#: ./docs/8.x/billing.md:740 +#: ./docs/9.x/billing.md:818 +#: ./docs/10.x/billing.md:1000 +#: ./docs/11.x/billing.md:997 +#: ./docs/master/billing.md:1000 msgid "The `recurring` method may be used to determine if the user is currently subscribed and is no longer within their trial period:" msgstr "" -#: docs/10.x/billing.md:block 256 (code) +# CODE +#: ./docs/8.x/billing.md:742 +#: ./docs/9.x/billing.md:820 msgid "if ($user->subscription('default')->recurring()) {\n" -" // ...\n" -"}\n" +" //\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 257 (quote) -msgid "**Warning** If a user has two subscriptions with the same name, the most recent subscription will always be returned by the `subscription` method. For example, a user might have two subscription records named `default`; however, one of the subscriptions may be an old, expired subscription, while the other is the current, active subscription. The most recent subscription will always be returned while older subscriptions are kept in the database for historical review." +# CODE +#: ./docs/10.x/billing.md:746 +#: ./docs/11.x/billing.md:743 +#: ./docs/master/billing.md:746 +msgid "if ($user->hasPaymentMethod()) {\n" +" // ...\n" +"}" +msgstr "" + +# P +#: ./docs/8.x/billing.md:746 +#: ./docs/9.x/billing.md:825 +msgid "If a user has two subscriptions with the same name, the most recent subscription will always be returned by the `subscription` method. For example, a user might have two subscription records named `default`; however, one of the subscriptions may be an old, expired subscription, while the other is the current, active subscription. The most recent subscription will always be returned while older subscriptions are kept in the database for historical review." +msgstr "" + +# P +#: ./docs/8.x/billing.md:748 +#: ./docs/9.x/billing.md:827 +#: ./docs/10.x/billing.md:1009 +#: ./docs/11.x/billing.md:1006 +#: ./docs/master/billing.md:1009 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:749 +#: ./docs/9.x/billing.md:828 +#: ./docs/10.x/billing.md:1010 +#: ./docs/11.x/billing.md:1007 +#: ./docs/master/billing.md:1010 +msgid "Canceled Subscription Status" msgstr "" -#: docs/10.x/billing.md:block 259 (header) -msgid "Canceled Subscription Status" +# P +#: ./docs/10.x/billing.md:750 +#: ./docs/11.x/billing.md:747 +#: ./docs/master/billing.md:750 +msgid "This method will determine if the billable model has any payment method at all. To determine if a payment method of a specific type exists for the model, you may pass the `type` as an argument to the method:" msgstr "" -#: docs/10.x/billing.md:block 260 (paragraph) +# P +#: ./docs/8.x/billing.md:751 +#: ./docs/9.x/billing.md:830 +#: ./docs/10.x/billing.md:1012 +#: ./docs/11.x/billing.md:1009 +#: ./docs/master/billing.md:1012 msgid "To determine if the user was once an active subscriber but has canceled their subscription, you may use the `canceled` method:" msgstr "" -#: docs/10.x/billing.md:block 261 (code) -msgid "if ($user->subscription('default')->canceled()) {\n" +# P +#: ./docs/9.x/billing.md:751 +msgid "You may also create subscriptions from the Stripe dashboard itself. When doing so, Cashier will sync newly added subscriptions and assign them a name of `default`. To customize the subscription name that is assigned to dashboard created subscriptions, [extend the `WebhookController`](#defining-webhook-event-handlers) and overwrite the `newSubscriptionName` method." +msgstr "" + +# CODE +#: ./docs/10.x/billing.md:752 +#: ./docs/11.x/billing.md:749 +#: ./docs/master/billing.md:752 +msgid "if ($user->hasPaymentMethod('sepa_debit')) {\n" " // ...\n" -"}\n" +"}" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:753 +#: ./docs/9.x/billing.md:832 +msgid "if ($user->subscription('default')->canceled()) {\n" +" //\n" +"}" +msgstr "" + +# P +#: ./docs/9.x/billing.md:755 +#: ./docs/10.x/billing.md:937 +#: ./docs/11.x/billing.md:934 +#: ./docs/master/billing.md:937 +msgid "Finally, you should always make sure to only add one active subscription per type of subscription offered by your application. If a customer has two `default` subscriptions, only the most recently added subscription will be used by Cashier even though both would be synced with your application's database." +msgstr "" + +# H3 +#: ./docs/10.x/billing.md:757 +#: ./docs/11.x/billing.md:754 +#: ./docs/master/billing.md:757 +msgid "Updating the Default Payment Method" msgstr "" -#: docs/10.x/billing.md:block 262 (paragraph) +# P +#: ./docs/8.x/billing.md:757 +#: ./docs/9.x/billing.md:836 +#: ./docs/10.x/billing.md:1018 +#: ./docs/11.x/billing.md:1015 +#: ./docs/master/billing.md:1018 msgid "You may also determine if a user has canceled their subscription but are still on their \"grace period\" until the subscription fully expires. For example, if a user cancels a subscription on March 5th that was originally scheduled to expire on March 10th, the user is on their \"grace period\" until March 10th. Note that the `subscribed` method still returns `true` during this time:" msgstr "" -#: docs/10.x/billing.md:block 263 (code) +# CODE +#: ./docs/8.x/billing.md:759 +#: ./docs/8.x/billing.md:1197 +#: ./docs/9.x/billing.md:838 +#: ./docs/9.x/billing.md:1309 msgid "if ($user->subscription('default')->onGracePeriod()) {\n" -" // ...\n" -"}\n" +" //\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 264 (paragraph) +# P +#: ./docs/8.x/billing.md:763 +#: ./docs/9.x/billing.md:842 +#: ./docs/10.x/billing.md:1024 +#: ./docs/11.x/billing.md:1021 +#: ./docs/master/billing.md:1024 msgid "To determine if the user has canceled their subscription and is no longer within their \"grace period\", you may use the `ended` method:" msgstr "" -#: docs/10.x/billing.md:block 265 (code) +# CODE +#: ./docs/8.x/billing.md:765 +#: ./docs/9.x/billing.md:844 msgid "if ($user->subscription('default')->ended()) {\n" -" // ...\n" -"}\n" -msgstr "" - -#: docs/10.x/billing.md:block 267 (header) +" //\n" +"}" +msgstr "" + +# P +#: ./docs/8.x/billing.md:769 +#: ./docs/9.x/billing.md:848 +#: ./docs/10.x/billing.md:1030 +#: ./docs/11.x/billing.md:1027 +#: ./docs/master/billing.md:1030 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:770 +#: ./docs/9.x/billing.md:849 +#: ./docs/10.x/billing.md:1031 +#: ./docs/11.x/billing.md:1028 +#: ./docs/master/billing.md:1031 msgid "Incomplete and Past Due Status" msgstr "" -#: docs/10.x/billing.md:block 268 (paragraph) +# P +#: ./docs/8.x/billing.md:772 +#: ./docs/9.x/billing.md:851 +#: ./docs/10.x/billing.md:1033 +#: ./docs/11.x/billing.md:1030 +#: ./docs/master/billing.md:1033 msgid "If a subscription requires a secondary payment action after creation the subscription will be marked as `incomplete`. Subscription statuses are stored in the `stripe_status` column of Cashier's `subscriptions` database table." msgstr "" -#: docs/10.x/billing.md:block 269 (paragraph) +# P +#: ./docs/8.x/billing.md:774 +#: ./docs/9.x/billing.md:853 +#: ./docs/10.x/billing.md:1035 +#: ./docs/11.x/billing.md:1032 +#: ./docs/master/billing.md:1035 msgid "Similarly, if a secondary payment action is required when swapping prices the subscription will be marked as `past_due`. When your subscription is in either of these states it will not be active until the customer has confirmed their payment. Determining if a subscription has an incomplete payment may be accomplished using the `hasIncompletePayment` method on the billable model or a subscription instance:" msgstr "" -#: docs/10.x/billing.md:block 270 (code) +# CODE +#: ./docs/8.x/billing.md:776 +#: ./docs/8.x/billing.md:1812 +#: ./docs/9.x/billing.md:855 +#: ./docs/9.x/billing.md:2026 msgid "if ($user->hasIncompletePayment('default')) {\n" -" // ...\n" +" //\n" "}\n\n" "if ($user->subscription('default')->hasIncompletePayment()) {\n" -" // ...\n" -"}\n" +" //\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 271 (paragraph) +# P +#: ./docs/8.x/billing.md:784 +#: ./docs/9.x/billing.md:863 +#: ./docs/10.x/billing.md:1045 +#: ./docs/11.x/billing.md:1042 +#: ./docs/master/billing.md:1045 msgid "When a subscription has an incomplete payment, you should direct the user to Cashier's payment confirmation page, passing the `latestPayment` identifier. You may use the `latestPayment` method available on subscription instance to retrieve this identifier:" msgstr "" -#: docs/10.x/billing.md:block 272 (code) +# CODE: html +#: ./docs/8.x/billing.md:786 +#: ./docs/9.x/billing.md:865 +#: ./docs/10.x/billing.md:1047 +#: ./docs/11.x/billing.md:1044 +#: ./docs/master/billing.md:1047 msgid "latestPayment()->id) }}\">\n" " Please confirm your payment.\n" -"\n" +"" msgstr "" -#: docs/10.x/billing.md:block 273 (paragraph) -msgid "If you would like the subscription to still be considered active when it's in a `past_due` or `incomplete` state, you may use the `keepPastDueSubscriptionsActive` and `keepIncompleteSubscriptionsActive` methods provided by Cashier. Typically, these methods should be called in the `register` method of your `App\\Providers\\AppServiceProvider`:" +# P +#: ./docs/8.x/billing.md:792 +msgid "If you would like the subscription to still be considered active when it's in a `past_due` state, you may use the `keepPastDueSubscriptionsActive` method provided by Cashier. Typically, this method should be called in the `register` method of your `App\\Providers\\AppServiceProvider`:" msgstr "" -#: docs/10.x/billing.md:block 274 (code) +# CODE +#: ./docs/8.x/billing.md:794 msgid "use Laravel\\Cashier\\Cashier;\n\n" "/**\n" " * Register any application services.\n" +" *\n" +" * @return void\n" " */\n" -"public function register(): void\n" +"public function register()\n" "{\n" " Cashier::keepPastDueSubscriptionsActive();\n" -" Cashier::keepIncompleteSubscriptionsActive();\n" -"}\n" -msgstr "" - -#: docs/10.x/billing.md:block 275 (quote) -msgid "**Warning** When a subscription is in an `incomplete` state it cannot be changed until the payment is confirmed. Therefore, the `swap` and `updateQuantity` methods will throw an exception when the subscription is in an `incomplete` state." -msgstr "" - -#: docs/10.x/billing.md:block 277 (header) +"}" +msgstr "" + +# P +#: ./docs/10.x/billing.md:795 +#: ./docs/11.x/billing.md:792 +#: ./docs/master/billing.md:795 +msgid "By default, this method will delete payment methods of every type. To delete payment methods of a specific type you can pass the `type` as an argument to the method:" +msgstr "" + +# P +#: ./docs/8.x/billing.md:806 +#: ./docs/9.x/billing.md:887 +#: ./docs/10.x/billing.md:1067 +#: ./docs/11.x/billing.md:1064 +#: ./docs/master/billing.md:1067 +msgid "When a subscription is in an `incomplete` state it cannot be changed until the payment is confirmed. Therefore, the `swap` and `updateQuantity` methods will throw an exception when the subscription is in an `incomplete` state." +msgstr "" + +# P +#: ./docs/8.x/billing.md:808 +#: ./docs/9.x/billing.md:889 +#: ./docs/10.x/billing.md:1069 +#: ./docs/11.x/billing.md:1066 +#: ./docs/master/billing.md:1069 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:809 +#: ./docs/9.x/billing.md:890 +#: ./docs/10.x/billing.md:1070 +#: ./docs/11.x/billing.md:1067 +#: ./docs/master/billing.md:1070 msgid "Subscription Scopes" msgstr "" -#: docs/10.x/billing.md:block 278 (paragraph) +# P +#: ./docs/8.x/billing.md:811 +#: ./docs/9.x/billing.md:892 +#: ./docs/10.x/billing.md:1072 +#: ./docs/11.x/billing.md:1069 +#: ./docs/master/billing.md:1072 msgid "Most subscription states are also available as query scopes so that you may easily query your database for subscriptions that are in a given state:" msgstr "" -#: docs/10.x/billing.md:block 279 (code) +# CODE +#: ./docs/8.x/billing.md:813 +#: ./docs/9.x/billing.md:894 +#: ./docs/10.x/billing.md:1074 +#: ./docs/11.x/billing.md:1071 +#: ./docs/master/billing.md:1074 msgid "// Get all active subscriptions...\n" "$subscriptions = Subscription::query()->active()->get();\n\n" "// Get all of the canceled subscriptions for a user...\n" -"$subscriptions = $user->subscriptions()->canceled()->get();\n" +"$subscriptions = $user->subscriptions()->canceled()->get();" msgstr "" -#: docs/10.x/billing.md:block 280 (paragraph) +# P +#: ./docs/8.x/billing.md:819 +#: ./docs/9.x/billing.md:900 +#: ./docs/10.x/billing.md:1080 +#: ./docs/11.x/billing.md:1077 +#: ./docs/master/billing.md:1080 msgid "A complete list of available scopes is available below:" msgstr "" -#: docs/10.x/billing.md:block 281 (code) +# CODE +#: ./docs/8.x/billing.md:821 +#: ./docs/9.x/billing.md:902 +#: ./docs/10.x/billing.md:1082 +#: ./docs/11.x/billing.md:1079 +#: ./docs/master/billing.md:1082 msgid "Subscription::query()->active();\n" "Subscription::query()->canceled();\n" "Subscription::query()->ended();\n" @@ -1461,75 +3937,224 @@ msgid "Subscription::query()->active();\n" "Subscription::query()->onGracePeriod();\n" "Subscription::query()->onTrial();\n" "Subscription::query()->pastDue();\n" -"Subscription::query()->recurring();\n" +"Subscription::query()->recurring();" msgstr "" -#: docs/10.x/billing.md:block 283 (header) +# P +#: ./docs/10.x/billing.md:822 +#: ./docs/11.x/billing.md:819 +#: ./docs/master/billing.md:822 +msgid "The first argument passed to the `newSubscription` method should be the internal type of the subscription. If your application only offers a single subscription, you might call this `default` or `primary`. This subscription type is only for internal application usage and is not meant to be shown to users. In addition, it should not contain spaces and it should never be changed after creating the subscription. The second argument is the specific price the user is subscribing to. This value should correspond to the price's identifier in Stripe." +msgstr "" + +# H4 +#: ./docs/10.x/billing.md:830 +#: ./docs/11.x/billing.md:827 +#: ./docs/master/billing.md:830 +msgid "Collecting Recurring Payments via Invoice Emails" +msgstr "" + +# P +#: ./docs/11.x/billing.md:833 +msgid "The amount of time a customer has to pay their invoice before their subscription is canceled is determined by the `days_until_due` option. By default, this is 30 days; however, you may provide a specific value for this option if you wish:" +msgstr "" + +# P +#: ./docs/8.x/billing.md:833 +#: ./docs/9.x/billing.md:914 +#: ./docs/10.x/billing.md:1094 +#: ./docs/11.x/billing.md:1091 +#: ./docs/master/billing.md:1094 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:834 +#: ./docs/9.x/billing.md:915 +#: ./docs/10.x/billing.md:1095 +#: ./docs/11.x/billing.md:1092 +#: ./docs/master/billing.md:1095 msgid "Changing Prices" msgstr "" -#: docs/10.x/billing.md:block 284 (paragraph) +# P +#: ./docs/8.x/billing.md:836 +#: ./docs/9.x/billing.md:917 +#: ./docs/10.x/billing.md:1097 +#: ./docs/11.x/billing.md:1094 +#: ./docs/master/billing.md:1097 msgid "After a customer is subscribed to your application, they may occasionally want to change to a new subscription price. To swap a customer to a new price, pass the Stripe price's identifier to the `swap` method. When swapping prices, it is assumed that the user would like to re-activate their subscription if it was previously canceled. The given price identifier should correspond to a Stripe price identifier available in the Stripe dashboard:" msgstr "" -#: docs/10.x/billing.md:block 285 (code) +# CODE +#: ./docs/8.x/billing.md:838 +#: ./docs/9.x/billing.md:919 +#: ./docs/10.x/billing.md:1099 +#: ./docs/11.x/billing.md:1096 +#: ./docs/master/billing.md:1099 msgid "use App\\Models\\User;\n\n" "$user = App\\Models\\User::find(1);\n\n" -"$user->subscription('default')->swap('price_yearly');\n" +"$user->subscription('default')->swap('price_yearly');" msgstr "" -#: docs/10.x/billing.md:block 286 (paragraph) +# P +#: ./docs/8.x/billing.md:844 +#: ./docs/9.x/billing.md:925 +#: ./docs/10.x/billing.md:1105 +#: ./docs/11.x/billing.md:1102 +#: ./docs/master/billing.md:1105 msgid "If the customer is on trial, the trial period will be maintained. Additionally, if a \"quantity\" exists for the subscription, that quantity will also be maintained." msgstr "" -#: docs/10.x/billing.md:block 287 (paragraph) +# P +#: ./docs/8.x/billing.md:846 +#: ./docs/9.x/billing.md:927 +#: ./docs/10.x/billing.md:1107 +#: ./docs/11.x/billing.md:1104 +#: ./docs/master/billing.md:1107 msgid "If you would like to swap prices and cancel any trial period the customer is currently on, you may invoke the `skipTrial` method:" msgstr "" -#: docs/10.x/billing.md:block 288 (code) +# CODE +#: ./docs/8.x/billing.md:848 +#: ./docs/9.x/billing.md:929 +#: ./docs/10.x/billing.md:1109 +#: ./docs/11.x/billing.md:1106 +#: ./docs/master/billing.md:1109 msgid "$user->subscription('default')\n" " ->skipTrial()\n" -" ->swap('price_yearly');\n" +" ->swap('price_yearly');" msgstr "" -#: docs/10.x/billing.md:block 289 (paragraph) +# P +#: ./docs/8.x/billing.md:852 +#: ./docs/9.x/billing.md:933 +#: ./docs/10.x/billing.md:1113 +#: ./docs/11.x/billing.md:1110 +#: ./docs/master/billing.md:1113 msgid "If you would like to swap prices and immediately invoice the customer instead of waiting for their next billing cycle, you may use the `swapAndInvoice` method:" msgstr "" -#: docs/10.x/billing.md:block 290 (code) +# CODE +#: ./docs/8.x/billing.md:854 +#: ./docs/9.x/billing.md:935 +#: ./docs/10.x/billing.md:1115 +#: ./docs/11.x/billing.md:1112 +#: ./docs/master/billing.md:1115 msgid "$user = User::find(1);\n\n" -"$user->subscription('default')->swapAndInvoice('price_yearly');\n" +"$user->subscription('default')->swapAndInvoice('price_yearly');" +msgstr "" + +# P +#: ./docs/8.x/billing.md:858 +#: ./docs/9.x/billing.md:939 +#: ./docs/10.x/billing.md:1119 +#: ./docs/11.x/billing.md:1116 +#: ./docs/master/billing.md:1119 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:859 +#: ./docs/9.x/billing.md:940 +#: ./docs/10.x/billing.md:1120 +#: ./docs/11.x/billing.md:1117 +#: ./docs/master/billing.md:1120 +msgid "Prorations" msgstr "" -#: docs/10.x/billing.md:block 292 (header) -msgid "Prorations" -msgstr "" - -#: docs/10.x/billing.md:block 293 (paragraph) +# P +#: ./docs/8.x/billing.md:861 +#: ./docs/9.x/billing.md:942 +#: ./docs/10.x/billing.md:1122 +#: ./docs/11.x/billing.md:1119 +#: ./docs/master/billing.md:1122 msgid "By default, Stripe prorates charges when swapping between prices. The `noProrate` method may be used to update the subscription's price without prorating the charges:" msgstr "" -#: docs/10.x/billing.md:block 294 (code) -msgid "$user->subscription('default')->noProrate()->swap('price_yearly');\n" +# CODE +#: ./docs/8.x/billing.md:863 +#: ./docs/9.x/billing.md:944 +#: ./docs/10.x/billing.md:1124 +#: ./docs/11.x/billing.md:1121 +#: ./docs/master/billing.md:1124 +msgid "$user->subscription('default')->noProrate()->swap('price_yearly');" msgstr "" -#: docs/10.x/billing.md:block 295 (paragraph) +# P +#: ./docs/8.x/billing.md:865 +#: ./docs/9.x/billing.md:946 +#: ./docs/10.x/billing.md:1126 +#: ./docs/11.x/billing.md:1123 +#: ./docs/master/billing.md:1126 msgid "For more information on subscription proration, consult the [Stripe documentation](https://stripe.com/docs/billing/subscriptions/prorations)." msgstr "" -#: docs/10.x/billing.md:block 296 (quote) -msgid "**Warning** Executing the `noProrate` method before the `swapAndInvoice` method will have no effect on proration. An invoice will always be issued." +# P +#: ./docs/8.x/billing.md:867 +#: ./docs/9.x/billing.md:949 +#: ./docs/10.x/billing.md:1129 +#: ./docs/11.x/billing.md:1126 +#: ./docs/master/billing.md:1129 +msgid "Executing the `noProrate` method before the `swapAndInvoice` method will have no effect on proration. An invoice will always be issued." +msgstr "" + +# P +#: ./docs/8.x/billing.md:869 +#: ./docs/9.x/billing.md:951 +#: ./docs/10.x/billing.md:1131 +#: ./docs/11.x/billing.md:1128 +#: ./docs/master/billing.md:1131 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:870 +#: ./docs/9.x/billing.md:952 +#: ./docs/10.x/billing.md:1132 +#: ./docs/11.x/billing.md:1129 +#: ./docs/master/billing.md:1132 +msgid "Subscription Quantity" msgstr "" -#: docs/10.x/billing.md:block 298 (header) -msgid "Subscription Quantity" +# P +#: ./docs/9.x/billing.md:871 +#: ./docs/10.x/billing.md:1053 +#: ./docs/11.x/billing.md:1050 +#: ./docs/master/billing.md:1053 +msgid "If you would like the subscription to still be considered active when it's in a `past_due` or `incomplete` state, you may use the `keepPastDueSubscriptionsActive` and `keepIncompleteSubscriptionsActive` methods provided by Cashier. Typically, these methods should be called in the `register` method of your `App\\Providers\\AppServiceProvider`:" msgstr "" -#: docs/10.x/billing.md:block 299 (paragraph) +# P +#: ./docs/8.x/billing.md:872 +#: ./docs/9.x/billing.md:954 +#: ./docs/10.x/billing.md:1134 +#: ./docs/11.x/billing.md:1131 +#: ./docs/master/billing.md:1134 msgid "Sometimes subscriptions are affected by \"quantity\". For example, a project management application might charge $10 per month per project. You may use the `incrementQuantity` and `decrementQuantity` methods to easily increment or decrement your subscription quantity:" msgstr "" -#: docs/10.x/billing.md:block 300 (code) +# CODE +#: ./docs/9.x/billing.md:873 +msgid "use Laravel\\Cashier\\Cashier;\n\n" +"/**\n" +" * Register any application services.\n" +" *\n" +" * @return void\n" +" */\n" +"public function register()\n" +"{\n" +" Cashier::keepPastDueSubscriptionsActive();\n" +" Cashier::keepIncompleteSubscriptionsActive();\n" +"}" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:874 +#: ./docs/9.x/billing.md:956 +#: ./docs/10.x/billing.md:1136 +#: ./docs/11.x/billing.md:1133 +#: ./docs/master/billing.md:1136 msgid "use App\\Models\\User;\n\n" "$user = User::find(1);\n\n" "$user->subscription('default')->incrementQuantity();\n\n" @@ -1537,54 +4162,104 @@ msgid "use App\\Models\\User;\n\n" "$user->subscription('default')->incrementQuantity(5);\n\n" "$user->subscription('default')->decrementQuantity();\n\n" "// Subtract five from the subscription's current quantity...\n" -"$user->subscription('default')->decrementQuantity(5);\n" +"$user->subscription('default')->decrementQuantity(5);" msgstr "" -#: docs/10.x/billing.md:block 301 (paragraph) +# P +#: ./docs/8.x/billing.md:888 +#: ./docs/9.x/billing.md:970 +#: ./docs/10.x/billing.md:1150 +#: ./docs/11.x/billing.md:1147 +#: ./docs/master/billing.md:1150 msgid "Alternatively, you may set a specific quantity using the `updateQuantity` method:" msgstr "" -#: docs/10.x/billing.md:block 302 (code) -msgid "$user->subscription('default')->updateQuantity(10);\n" +# CODE +#: ./docs/8.x/billing.md:890 +#: ./docs/9.x/billing.md:972 +#: ./docs/10.x/billing.md:1152 +#: ./docs/11.x/billing.md:1149 +#: ./docs/master/billing.md:1152 +msgid "$user->subscription('default')->updateQuantity(10);" msgstr "" -#: docs/10.x/billing.md:block 303 (paragraph) +# P +#: ./docs/8.x/billing.md:892 +#: ./docs/9.x/billing.md:974 +#: ./docs/10.x/billing.md:1154 +#: ./docs/11.x/billing.md:1151 +#: ./docs/master/billing.md:1154 msgid "The `noProrate` method may be used to update the subscription's quantity without prorating the charges:" msgstr "" -#: docs/10.x/billing.md:block 304 (code) -msgid "$user->subscription('default')->noProrate()->updateQuantity(10);\n" +# CODE +#: ./docs/8.x/billing.md:894 +#: ./docs/9.x/billing.md:976 +#: ./docs/10.x/billing.md:1156 +#: ./docs/11.x/billing.md:1153 +#: ./docs/master/billing.md:1156 +msgid "$user->subscription('default')->noProrate()->updateQuantity(10);" msgstr "" -#: docs/10.x/billing.md:block 305 (paragraph) +# P +#: ./docs/8.x/billing.md:896 +#: ./docs/9.x/billing.md:978 +#: ./docs/10.x/billing.md:1158 +#: ./docs/11.x/billing.md:1155 +#: ./docs/master/billing.md:1158 msgid "For more information on subscription quantities, consult the [Stripe documentation](https://stripe.com/docs/subscriptions/quantities)." msgstr "" -#: docs/10.x/billing.md:block 307 (header) -msgid "Quantities For Subscriptions With Multiple Products" +# P +#: ./docs/8.x/billing.md:898 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:899 +msgid "Multiprice Subscription Quantities" msgstr "" -#: docs/10.x/billing.md:block 308 (paragraph) -msgid "If your subscription is a [subscription with multiple products](#subscriptions-with-multiple-products), you should pass the ID of the price whose quantity you wish to increment or decrement as the second argument to the increment / decrement methods:" +# P +#: ./docs/8.x/billing.md:901 +msgid "If your subscription is a [multiprice subscription](#multiprice-subscriptions), you should pass the name of the price whose quantity you wish to increment or decrement as the second argument to the increment / decrement methods:" msgstr "" -#: docs/10.x/billing.md:block 309 (code) -msgid "$user->subscription('default')->incrementQuantity(1, 'price_chat');\n" +# CODE +#: ./docs/8.x/billing.md:903 +#: ./docs/9.x/billing.md:985 +#: ./docs/10.x/billing.md:1165 +#: ./docs/11.x/billing.md:1162 +#: ./docs/master/billing.md:1165 +msgid "$user->subscription('default')->incrementQuantity(1, 'price_chat');" msgstr "" -#: docs/10.x/billing.md:block 311 (header) -msgid "Subscriptions With Multiple Products" +# P +#: ./docs/8.x/billing.md:905 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:906 +msgid "Multiprice Subscriptions" msgstr "" -#: docs/10.x/billing.md:block 312 (paragraph) -msgid "[Subscription with multiple products](https://stripe.com/docs/billing/subscriptions/multiple-products) allow you to assign multiple billing products to a single subscription. For example, imagine you are building a customer service \"helpdesk\" application that has a base subscription price of $10 per month but offers a live chat add-on product for an additional $15 per month. Information for subscriptions with multiple products is stored in Cashier's `subscription_items` database table." +# P +#: ./docs/8.x/billing.md:908 +msgid "[Multiprice subscriptions](https://stripe.com/docs/billing/subscriptions/multiple-products) allow you to assign multiple billing prices to a single subscription. For example, imagine you are building a customer service \"helpdesk\" application that has a base subscription price of $10 per month but offers a live chat add-on price for an additional $15 per month. Multiprice subscription information is stored in Cashier's `subscription_items` database table." msgstr "" -#: docs/10.x/billing.md:block 313 (paragraph) -msgid "You may specify multiple products for a given subscription by passing an array of prices as the second argument to the `newSubscription` method:" +# P +#: ./docs/8.x/billing.md:910 +msgid "You may specify multiple prices for a given subscription by passing an array of prices as the second argument to the `newSubscription` method:" msgstr "" -#: docs/10.x/billing.md:block 314 (code) +# CODE +#: ./docs/8.x/billing.md:912 +#: ./docs/9.x/billing.md:994 +#: ./docs/10.x/billing.md:1174 +#: ./docs/11.x/billing.md:1171 +#: ./docs/master/billing.md:1174 msgid "use Illuminate\\Http\\Request;\n\n" "Route::post('/user/subscribe', function (Request $request) {\n" " $request->user()->newSubscription('default', [\n" @@ -1592,399 +4267,1142 @@ msgid "use Illuminate\\Http\\Request;\n\n" " 'price_chat',\n" " ])->create($request->paymentMethodId);\n\n" " // ...\n" -"});\n" +"});" msgstr "" -#: docs/10.x/billing.md:block 315 (paragraph) +# P +#: ./docs/8.x/billing.md:923 +#: ./docs/9.x/billing.md:1005 +#: ./docs/10.x/billing.md:1185 +#: ./docs/11.x/billing.md:1182 +#: ./docs/master/billing.md:1185 msgid "In the example above, the customer will have two prices attached to their `default` subscription. Both prices will be charged on their respective billing intervals. If necessary, you may use the `quantity` method to indicate a specific quantity for each price:" msgstr "" -#: docs/10.x/billing.md:block 316 (code) +# CODE +#: ./docs/8.x/billing.md:925 +#: ./docs/9.x/billing.md:1007 +#: ./docs/10.x/billing.md:1187 +#: ./docs/11.x/billing.md:1184 +#: ./docs/master/billing.md:1187 msgid "$user = User::find(1);\n\n" "$user->newSubscription('default', ['price_monthly', 'price_chat'])\n" " ->quantity(5, 'price_chat')\n" -" ->create($paymentMethod);\n" +" ->create($paymentMethod);" +msgstr "" + +# H4 +#: ./docs/10.x/billing.md:931 +#: ./docs/11.x/billing.md:928 +#: ./docs/master/billing.md:931 +msgid "Creating Subscriptions From the Stripe Dashboard" msgstr "" -#: docs/10.x/billing.md:block 317 (paragraph) +# P +#: ./docs/8.x/billing.md:931 +#: ./docs/9.x/billing.md:1013 +#: ./docs/10.x/billing.md:1193 +#: ./docs/11.x/billing.md:1190 +#: ./docs/master/billing.md:1193 msgid "If you would like to add another price to an existing subscription, you may invoke the subscription's `addPrice` method:" msgstr "" -#: docs/10.x/billing.md:block 318 (code) +# P +#: ./docs/10.x/billing.md:933 +#: ./docs/11.x/billing.md:930 +#: ./docs/master/billing.md:933 +msgid "You may also create subscriptions from the Stripe dashboard itself. When doing so, Cashier will sync newly added subscriptions and assign them a type of `default`. To customize the subscription type that is assigned to dashboard created subscriptions, [define webhook event handlers](#defining-webhook-event-handlers)." +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:933 +#: ./docs/9.x/billing.md:1015 +#: ./docs/10.x/billing.md:1195 +#: ./docs/11.x/billing.md:1192 +#: ./docs/master/billing.md:1195 msgid "$user = User::find(1);\n\n" -"$user->subscription('default')->addPrice('price_chat');\n" +"$user->subscription('default')->addPrice('price_chat');" +msgstr "" + +# P +#: ./docs/10.x/billing.md:935 +#: ./docs/11.x/billing.md:932 +#: ./docs/master/billing.md:935 +msgid "In addition, you may only create one type of subscription via the Stripe dashboard. If your application offers multiple subscriptions that use different types, only one type of subscription may be added through the Stripe dashboard." msgstr "" -#: docs/10.x/billing.md:block 319 (paragraph) +# P +#: ./docs/8.x/billing.md:937 +#: ./docs/9.x/billing.md:1019 +#: ./docs/10.x/billing.md:1199 +#: ./docs/11.x/billing.md:1196 +#: ./docs/master/billing.md:1199 msgid "The example above will add the new price and the customer will be billed for it on their next billing cycle. If you would like to bill the customer immediately you may use the `addPriceAndInvoice` method:" msgstr "" -#: docs/10.x/billing.md:block 320 (code) -msgid "$user->subscription('default')->addPriceAndInvoice('price_chat');\n" +# CODE +#: ./docs/8.x/billing.md:939 +#: ./docs/9.x/billing.md:1021 +#: ./docs/10.x/billing.md:1201 +#: ./docs/11.x/billing.md:1198 +#: ./docs/master/billing.md:1201 +msgid "$user->subscription('default')->addPriceAndInvoice('price_chat');" msgstr "" -#: docs/10.x/billing.md:block 321 (paragraph) +# P +#: ./docs/8.x/billing.md:941 +#: ./docs/9.x/billing.md:1023 +#: ./docs/10.x/billing.md:1203 +#: ./docs/11.x/billing.md:1200 +#: ./docs/master/billing.md:1203 msgid "If you would like to add a price with a specific quantity, you can pass the quantity as the second argument of the `addPrice` or `addPriceAndInvoice` methods:" msgstr "" -#: docs/10.x/billing.md:block 322 (code) +# P +#: ./docs/10.x/billing.md:942 +#: ./docs/11.x/billing.md:939 +#: ./docs/master/billing.md:942 +msgid "Once a customer is subscribed to your application, you may easily check their subscription status using a variety of convenient methods. First, the `subscribed` method returns `true` if the customer has an active subscription, even if the subscription is currently within its trial period. The `subscribed` method accepts the type of the subscription as its first argument:" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:943 +#: ./docs/9.x/billing.md:1025 +#: ./docs/10.x/billing.md:1205 +#: ./docs/11.x/billing.md:1202 +#: ./docs/master/billing.md:1205 msgid "$user = User::find(1);\n\n" -"$user->subscription('default')->addPrice('price_chat', 5);\n" +"$user->subscription('default')->addPrice('price_chat', 5);" msgstr "" -#: docs/10.x/billing.md:block 323 (paragraph) -msgid "You may remove prices from subscriptions using the `removePrice` method:" +# CODE +#: ./docs/10.x/billing.md:944 +#: ./docs/11.x/billing.md:941 +#: ./docs/master/billing.md:944 +msgid "if ($user->subscribed('default')) {\n" +" // ...\n" +"}" +msgstr "" + +# CODE +#: ./docs/11.x/billing.md:947 +msgid "user() && ! $request->user()->subscribed('default')) {\n" +" // This user is not a paying customer...\n" +" return redirect('/billing');\n" +" }\n\n" +" return $next($request);\n" +" }\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 324 (code) -msgid "$user->subscription('default')->removePrice('price_chat');\n" +# P +#: ./docs/8.x/billing.md:947 +#: ./docs/9.x/billing.md:1029 +#: ./docs/10.x/billing.md:1209 +#: ./docs/11.x/billing.md:1206 +#: ./docs/master/billing.md:1209 +msgid "You may remove prices from subscriptions using the `removePrice` method:" msgstr "" -#: docs/10.x/billing.md:block 325 (quote) -msgid "**Warning** You may not remove the last price on a subscription. Instead, you should simply cancel the subscription." +# CODE +#: ./docs/8.x/billing.md:949 +#: ./docs/9.x/billing.md:1031 +#: ./docs/10.x/billing.md:1211 +#: ./docs/11.x/billing.md:1208 +#: ./docs/master/billing.md:1211 +msgid "$user->subscription('default')->removePrice('price_chat');" msgstr "" -#: docs/10.x/billing.md:block 327 (header) +# CODE +#: ./docs/10.x/billing.md:950 +#: ./docs/master/billing.md:950 +msgid "user() && ! $request->user()->subscribed('default')) {\n" +" // This user is not a paying customer...\n" +" return redirect('billing');\n" +" }\n\n" +" return $next($request);\n" +" }\n" +"}" +msgstr "" + +# P +#: ./docs/8.x/billing.md:951 +#: ./docs/9.x/billing.md:1034 +#: ./docs/10.x/billing.md:1214 +#: ./docs/11.x/billing.md:1211 +#: ./docs/master/billing.md:1214 +msgid "You may not remove the last price on a subscription. Instead, you should simply cancel the subscription." +msgstr "" + +# P +#: ./docs/8.x/billing.md:953 +#: ./docs/9.x/billing.md:1036 +#: ./docs/10.x/billing.md:1216 +#: ./docs/11.x/billing.md:1213 +#: ./docs/master/billing.md:1216 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:954 +#: ./docs/9.x/billing.md:1037 +#: ./docs/10.x/billing.md:1217 +#: ./docs/11.x/billing.md:1214 +#: ./docs/master/billing.md:1217 msgid "Swapping Prices" msgstr "" -#: docs/10.x/billing.md:block 328 (paragraph) -msgid "You may also change the prices attached to a subscription with multiple products. For example, imagine a customer has a `price_basic` subscription with a `price_chat` add-on product and you want to upgrade the customer from the `price_basic` to the `price_pro` price:" +# P +#: ./docs/8.x/billing.md:956 +msgid "You may also change the prices attached to a multiprice subscription. For example, imagine a customer has a `price_basic` subscription with a `price_chat` add-on price and you want to upgrade the customer from the `price_basic` to the `price_pro` price:" msgstr "" -#: docs/10.x/billing.md:block 329 (code) +# CODE +#: ./docs/8.x/billing.md:958 +#: ./docs/9.x/billing.md:1041 +#: ./docs/10.x/billing.md:1221 +#: ./docs/11.x/billing.md:1218 +#: ./docs/master/billing.md:1221 msgid "use App\\Models\\User;\n\n" "$user = User::find(1);\n\n" -"$user->subscription('default')->swap(['price_pro', 'price_chat']);\n" +"$user->subscription('default')->swap(['price_pro', 'price_chat']);" msgstr "" -#: docs/10.x/billing.md:block 330 (paragraph) +# P +#: ./docs/8.x/billing.md:964 +#: ./docs/9.x/billing.md:1047 +#: ./docs/10.x/billing.md:1227 +#: ./docs/11.x/billing.md:1224 +#: ./docs/master/billing.md:1227 msgid "When executing the example above, the underlying subscription item with the `price_basic` is deleted and the one with the `price_chat` is preserved. Additionally, a new subscription item for the `price_pro` is created." msgstr "" -#: docs/10.x/billing.md:block 331 (paragraph) +# P +#: ./docs/8.x/billing.md:966 +#: ./docs/9.x/billing.md:1049 +#: ./docs/10.x/billing.md:1229 +#: ./docs/11.x/billing.md:1226 +#: ./docs/master/billing.md:1229 msgid "You can also specify subscription item options by passing an array of key / value pairs to the `swap` method. For example, you may need to specify the subscription price quantities:" msgstr "" -#: docs/10.x/billing.md:block 332 (code) +# CODE +#: ./docs/8.x/billing.md:968 +#: ./docs/9.x/billing.md:1051 +#: ./docs/10.x/billing.md:1231 +#: ./docs/11.x/billing.md:1228 +#: ./docs/master/billing.md:1231 msgid "$user = User::find(1);\n\n" "$user->subscription('default')->swap([\n" " 'price_pro' => ['quantity' => 5],\n" " 'price_chat'\n" -"]);\n" +"]);" msgstr "" -#: docs/10.x/billing.md:block 333 (paragraph) +# P +#: ./docs/8.x/billing.md:975 +#: ./docs/9.x/billing.md:1058 +#: ./docs/10.x/billing.md:1238 +#: ./docs/11.x/billing.md:1235 +#: ./docs/master/billing.md:1238 msgid "If you want to swap a single price on a subscription, you may do so using the `swap` method on the subscription item itself. This approach is particularly useful if you would like to preserve all of the existing metadata on the subscription's other prices:" msgstr "" -#: docs/10.x/billing.md:block 334 (code) +# CODE +#: ./docs/8.x/billing.md:977 +#: ./docs/9.x/billing.md:1060 +#: ./docs/10.x/billing.md:1240 +#: ./docs/11.x/billing.md:1237 +#: ./docs/master/billing.md:1240 msgid "$user = User::find(1);\n\n" "$user->subscription('default')\n" " ->findItemOrFail('price_basic')\n" -" ->swap('price_pro');\n" +" ->swap('price_pro');" msgstr "" -#: docs/10.x/billing.md:block 336 (header) -msgid "Proration" +# CODE +#: ./docs/10.x/billing.md:978 +#: ./docs/11.x/billing.md:975 +#: ./docs/master/billing.md:978 +msgid "if ($user->subscription('default')->onTrial()) {\n" +" // ...\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 337 (paragraph) -msgid "By default, Stripe will prorate charges when adding or removing prices from a subscription with multiple products. If you would like to make a price adjustment without proration, you should chain the `noProrate` method onto your price operation:" +# P +#: ./docs/9.x/billing.md:980 +#: ./docs/10.x/billing.md:1160 +#: ./docs/11.x/billing.md:1157 +#: ./docs/master/billing.md:1160 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/9.x/billing.md:981 +msgid "Quantities For Subscriptions With Multiple Products" msgstr "" -#: docs/10.x/billing.md:block 338 (code) -msgid "$user->subscription('default')->noProrate()->removePrice('price_chat');\n" +# P +#: ./docs/8.x/billing.md:983 +#: ./docs/9.x/billing.md:1066 +#: ./docs/10.x/billing.md:1246 +#: ./docs/11.x/billing.md:1243 +#: ./docs/master/billing.md:1246 +#~ msgid "" +#~ msgstr "" + +# P +#: ./docs/9.x/billing.md:983 +#: ./docs/10.x/billing.md:1163 +#: ./docs/11.x/billing.md:1160 +#: ./docs/master/billing.md:1163 +msgid "If your subscription is a [subscription with multiple products](#subscriptions-with-multiple-products), you should pass the ID of the price whose quantity you wish to increment or decrement as the second argument to the increment / decrement methods:" msgstr "" -#: docs/10.x/billing.md:block 341 (paragraph) -msgid "If you would like to update quantities on individual subscription prices, you may do so using the [existing quantity methods](#subscription-quantity) by passing the name of the price as an additional argument to the method:" +# CODE +#: ./docs/10.x/billing.md:984 +#: ./docs/11.x/billing.md:981 +#: ./docs/master/billing.md:984 +msgid "if ($user->subscribedToProduct('prod_premium', 'default')) {\n" +" // ...\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 342 (code) -msgid "$user = User::find(1);\n\n" -"$user->subscription('default')->incrementQuantity(5, 'price_chat');\n\n" -"$user->subscription('default')->decrementQuantity(3, 'price_chat');\n\n" -"$user->subscription('default')->updateQuantity(10, 'price_chat');\n" +# H4 +#: ./docs/8.x/billing.md:984 +#: ./docs/9.x/billing.md:1067 +#: ./docs/10.x/billing.md:1247 +#: ./docs/11.x/billing.md:1244 +#: ./docs/master/billing.md:1247 +msgid "Proration" msgstr "" -#: docs/10.x/billing.md:block 343 (quote) -msgid "**Warning** When a subscription has multiple prices the `stripe_price` and `quantity` attributes on the `Subscription` model will be `null`. To access the individual price attributes, you should use the `items` relationship available on the `Subscription` model." +# P +#: ./docs/8.x/billing.md:986 +msgid "By default, Stripe will prorate charges when adding or removing prices from a multiprice subscription. If you would like to make a price adjustment without proration, you should chain the `noProrate` method onto your price operation:" msgstr "" -#: docs/10.x/billing.md:block 345 (header) -msgid "Subscription Items" +# P +#: ./docs/9.x/billing.md:987 +#: ./docs/10.x/billing.md:1167 +#: ./docs/11.x/billing.md:1164 +#: ./docs/master/billing.md:1167 +#~ msgid "" +#~ msgstr "" + +# CODE +#: ./docs/8.x/billing.md:988 +#: ./docs/9.x/billing.md:1071 +#: ./docs/10.x/billing.md:1251 +#: ./docs/11.x/billing.md:1248 +#: ./docs/master/billing.md:1251 +msgid "$user->subscription('default')->noProrate()->removePrice('price_chat');" +msgstr "" + +# H3 +#: ./docs/9.x/billing.md:988 +#: ./docs/10.x/billing.md:1168 +#: ./docs/11.x/billing.md:1165 +#: ./docs/master/billing.md:1168 +msgid "Subscriptions With Multiple Products" msgstr "" -#: docs/10.x/billing.md:block 346 (paragraph) -msgid "When a subscription has multiple prices, it will have multiple subscription \"items\" stored in your database's `subscription_items` table. You may access these via the `items` relationship on the subscription:" +# CODE +#: ./docs/10.x/billing.md:990 +#: ./docs/11.x/billing.md:987 +#: ./docs/master/billing.md:990 +msgid "if ($user->subscribedToProduct(['prod_basic', 'prod_premium'], 'default')) {\n" +" // ...\n" +"}" +msgstr "" + +# P +#: ./docs/8.x/billing.md:990 +#: ./docs/9.x/billing.md:1073 +#: ./docs/10.x/billing.md:1253 +#: ./docs/11.x/billing.md:1250 +#: ./docs/master/billing.md:1253 +#~ msgid "" +#~ msgstr "" + +# P +#: ./docs/9.x/billing.md:990 +#: ./docs/10.x/billing.md:1170 +#: ./docs/11.x/billing.md:1167 +#: ./docs/master/billing.md:1170 +msgid "[Subscription with multiple products](https://stripe.com/docs/billing/subscriptions/multiple-products) allow you to assign multiple billing products to a single subscription. For example, imagine you are building a customer service \"helpdesk\" application that has a base subscription price of $10 per month but offers a live chat add-on product for an additional $15 per month. Information for subscriptions with multiple products is stored in Cashier's `subscription_items` database table." msgstr "" -#: docs/10.x/billing.md:block 347 (code) -msgid "use App\\Models\\User;\n\n" -"$user = User::find(1);\n\n" -"$subscriptionItem = $user->subscription('default')->items->first();\n\n" -"// Retrieve the Stripe price and quantity for a specific item...\n" -"$stripePrice = $subscriptionItem->stripe_price;\n" -"$quantity = $subscriptionItem->quantity;\n" +# P +#: ./docs/9.x/billing.md:992 +#: ./docs/10.x/billing.md:1172 +#: ./docs/11.x/billing.md:1169 +#: ./docs/master/billing.md:1172 +msgid "You may specify multiple products for a given subscription by passing an array of prices as the second argument to the `newSubscription` method:" msgstr "" -#: docs/10.x/billing.md:block 348 (paragraph) -msgid "You can also retrieve a specific price using the `findItemOrFail` method:" +# P +#: ./docs/8.x/billing.md:993 +#: ./docs/9.x/billing.md:1076 +msgid "If you would like to update quantities on individual subscription prices, you may do so using the [existing quantity methods](#subscription-quantity) by passing the name of the price as an additional argument to the method:" msgstr "" -#: docs/10.x/billing.md:block 349 (code) +# CODE +#: ./docs/8.x/billing.md:995 +#: ./docs/9.x/billing.md:1078 +#: ./docs/10.x/billing.md:1258 +#: ./docs/11.x/billing.md:1255 +#: ./docs/master/billing.md:1258 msgid "$user = User::find(1);\n\n" -"$subscriptionItem = $user->subscription('default')->findItemOrFail('price_chat');\n" +"$user->subscription('default')->incrementQuantity(5, 'price_chat');\n\n" +"$user->subscription('default')->decrementQuantity(3, 'price_chat');\n\n" +"$user->subscription('default')->updateQuantity(10, 'price_chat');" msgstr "" -#: docs/10.x/billing.md:block 351 (header) -msgid "Multiple Subscriptions" +# CODE +#: ./docs/10.x/billing.md:996 +#: ./docs/11.x/billing.md:993 +#: ./docs/master/billing.md:996 +msgid "if ($user->subscribedToPrice('price_basic_monthly', 'default')) {\n" +" // ...\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 352 (paragraph) -msgid "Stripe allows your customers to have multiple subscriptions simultaneously. For example, you may run a gym that offers a swimming subscription and a weight-lifting subscription, and each subscription may have different pricing. Of course, customers should be able to subscribe to either or both plans." +# CODE +#: ./docs/10.x/billing.md:1002 +#: ./docs/11.x/billing.md:999 +#: ./docs/master/billing.md:1002 +msgid "if ($user->subscription('default')->recurring()) {\n" +" // ...\n" +"}" +msgstr "" + +# P +#: ./docs/8.x/billing.md:1003 +#: ./docs/9.x/billing.md:1087 +#: ./docs/10.x/billing.md:1267 +#: ./docs/11.x/billing.md:1264 +#: ./docs/master/billing.md:1267 +msgid "When a subscription has multiple prices the `stripe_price` and `quantity` attributes on the `Subscription` model will be `null`. To access the individual price attributes, you should use the `items` relationship available on the `Subscription` model." +msgstr "" + +# P +#: ./docs/8.x/billing.md:1005 +#: ./docs/9.x/billing.md:1089 +#: ./docs/10.x/billing.md:1269 +#: ./docs/11.x/billing.md:1266 +#: ./docs/master/billing.md:1269 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:1006 +#: ./docs/9.x/billing.md:1090 +#: ./docs/10.x/billing.md:1270 +#: ./docs/11.x/billing.md:1267 +#: ./docs/master/billing.md:1270 +msgid "Subscription Items" msgstr "" -#: docs/10.x/billing.md:block 353 (paragraph) -msgid "When your application creates subscriptions, you may provide the name of the subscription to the `newSubscription` method. The name may be any string that represents the type of subscription the user is initiating:" +# P +#: ./docs/10.x/billing.md:1007 +#: ./docs/11.x/billing.md:1004 +#: ./docs/master/billing.md:1007 +msgid "If a user has two subscriptions with the same type, the most recent subscription will always be returned by the `subscription` method. For example, a user might have two subscription records with the type of `default`; however, one of the subscriptions may be an old, expired subscription, while the other is the current, active subscription. The most recent subscription will always be returned while older subscriptions are kept in the database for historical review." msgstr "" -#: docs/10.x/billing.md:block 354 (code) -msgid "use Illuminate\\Http\\Request;\n\n" -"Route::post('/swimming/subscribe', function (Request $request) {\n" -" $request->user()->newSubscription('swimming')\n" -" ->price('price_swimming_monthly')\n" -" ->create($request->paymentMethodId);\n\n" -" // ...\n" -"});\n" +# P +#: ./docs/8.x/billing.md:1008 +#: ./docs/9.x/billing.md:1092 +#: ./docs/10.x/billing.md:1272 +#: ./docs/11.x/billing.md:1269 +#: ./docs/master/billing.md:1272 +msgid "When a subscription has multiple prices, it will have multiple subscription \"items\" stored in your database's `subscription_items` table. You may access these via the `items` relationship on the subscription:" msgstr "" -#: docs/10.x/billing.md:block 355 (paragraph) -msgid "In this example, we initiated a monthly swimming subscription for the customer. However, they may want to swap to a yearly subscription at a later time. When adjusting the customer's subscription, we can simply swap the price on the `swimming` subscription:" +# CODE +#: ./docs/8.x/billing.md:1010 +#: ./docs/9.x/billing.md:1094 +#: ./docs/10.x/billing.md:1274 +#: ./docs/11.x/billing.md:1271 +#: ./docs/master/billing.md:1274 +msgid "use App\\Models\\User;\n\n" +"$user = User::find(1);\n\n" +"$subscriptionItem = $user->subscription('default')->items->first();\n\n" +"// Retrieve the Stripe price and quantity for a specific item...\n" +"$stripePrice = $subscriptionItem->stripe_price;\n" +"$quantity = $subscriptionItem->quantity;" msgstr "" -#: docs/10.x/billing.md:block 356 (code) -msgid "$user->subscription('swimming')->swap('price_swimming_yearly');\n" +# CODE +#: ./docs/10.x/billing.md:1014 +#: ./docs/11.x/billing.md:1011 +#: ./docs/master/billing.md:1014 +msgid "if ($user->subscription('default')->canceled()) {\n" +" // ...\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 357 (paragraph) -msgid "Of course, you may also cancel the subscription entirely:" +# CODE +#: ./docs/10.x/billing.md:1020 +#: ./docs/10.x/billing.md:1489 +#: ./docs/11.x/billing.md:1017 +#: ./docs/11.x/billing.md:1486 +#: ./docs/master/billing.md:1020 +#: ./docs/master/billing.md:1489 +msgid "if ($user->subscription('default')->onGracePeriod()) {\n" +" // ...\n" +"}" +msgstr "" + +# P +#: ./docs/8.x/billing.md:1020 +#: ./docs/9.x/billing.md:1104 +#: ./docs/10.x/billing.md:1284 +#: ./docs/11.x/billing.md:1281 +#: ./docs/master/billing.md:1284 +msgid "You can also retrieve a specific price using the `findItemOrFail` method:" msgstr "" -#: docs/10.x/billing.md:block 358 (code) -msgid "$user->subscription('swimming')->cancel();\n" +# CODE +#: ./docs/8.x/billing.md:1022 +#: ./docs/9.x/billing.md:1106 +#: ./docs/10.x/billing.md:1286 +#: ./docs/11.x/billing.md:1283 +#: ./docs/master/billing.md:1286 +msgid "$user = User::find(1);\n\n" +"$subscriptionItem = $user->subscription('default')->findItemOrFail('price_chat');" msgstr "" -#: docs/10.x/billing.md:block 360 (header) +# CODE +#: ./docs/10.x/billing.md:1026 +#: ./docs/11.x/billing.md:1023 +#: ./docs/master/billing.md:1026 +msgid "if ($user->subscription('default')->ended()) {\n" +" // ...\n" +"}" +msgstr "" + +# P +#: ./docs/8.x/billing.md:1026 +#: ./docs/9.x/billing.md:1135 +#: ./docs/10.x/billing.md:1315 +#: ./docs/11.x/billing.md:1312 +#: ./docs/master/billing.md:1315 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:1027 +#: ./docs/9.x/billing.md:1136 +#: ./docs/10.x/billing.md:1316 +#: ./docs/11.x/billing.md:1313 +#: ./docs/master/billing.md:1316 msgid "Metered Billing" msgstr "" -#: docs/10.x/billing.md:block 361 (paragraph) +# P +#: ./docs/8.x/billing.md:1029 +#: ./docs/9.x/billing.md:1138 +#: ./docs/10.x/billing.md:1318 +#: ./docs/11.x/billing.md:1315 +#: ./docs/master/billing.md:1318 msgid "[Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) allows you to charge customers based on their product usage during a billing cycle. For example, you may charge customers based on the number of text messages or emails they send per month." msgstr "" -#: docs/10.x/billing.md:block 362 (paragraph) +# P +#: ./docs/8.x/billing.md:1031 +#: ./docs/9.x/billing.md:1140 +#: ./docs/10.x/billing.md:1320 +#: ./docs/11.x/billing.md:1317 +#: ./docs/master/billing.md:1320 msgid "To start using metered billing, you will first need to create a new product in your Stripe dashboard with a metered price. Then, use the `meteredPrice` to add the metered price ID to a customer subscription:" msgstr "" -#: docs/10.x/billing.md:block 363 (code) +# CODE +#: ./docs/8.x/billing.md:1033 +#: ./docs/9.x/billing.md:1142 +#: ./docs/10.x/billing.md:1322 +#: ./docs/11.x/billing.md:1319 +#: ./docs/master/billing.md:1322 msgid "use Illuminate\\Http\\Request;\n\n" "Route::post('/user/subscribe', function (Request $request) {\n" " $request->user()->newSubscription('default')\n" " ->meteredPrice('price_metered')\n" " ->create($request->paymentMethodId);\n\n" " // ...\n" -"});\n" +"});" +msgstr "" + +# CODE +#: ./docs/10.x/billing.md:1037 +#: ./docs/10.x/billing.md:2204 +#: ./docs/11.x/billing.md:1034 +#: ./docs/11.x/billing.md:2184 +#: ./docs/master/billing.md:1037 +#: ./docs/master/billing.md:2187 +msgid "if ($user->hasIncompletePayment('default')) {\n" +" // ...\n" +"}\n\n" +"if ($user->subscription('default')->hasIncompletePayment()) {\n" +" // ...\n" +"}" +msgstr "" + +# P +#: ./docs/9.x/billing.md:1039 +#: ./docs/10.x/billing.md:1219 +#: ./docs/11.x/billing.md:1216 +#: ./docs/master/billing.md:1219 +msgid "You may also change the prices attached to a subscription with multiple products. For example, imagine a customer has a `price_basic` subscription with a `price_chat` add-on product and you want to upgrade the customer from the `price_basic` to the `price_pro` price:" msgstr "" -#: docs/10.x/billing.md:block 364 (paragraph) +# P +#: ./docs/8.x/billing.md:1043 +#: ./docs/9.x/billing.md:1152 +#: ./docs/10.x/billing.md:1332 +#: ./docs/11.x/billing.md:1329 +#: ./docs/master/billing.md:1332 msgid "You may also start a metered subscription via [Stripe Checkout](#checkout):" msgstr "" -#: docs/10.x/billing.md:block 365 (code) +# CODE +#: ./docs/8.x/billing.md:1045 +#: ./docs/9.x/billing.md:1154 +#: ./docs/10.x/billing.md:1334 +#: ./docs/11.x/billing.md:1331 +#: ./docs/master/billing.md:1334 msgid "$checkout = Auth::user()\n" " ->newSubscription('default', [])\n" " ->meteredPrice('price_metered')\n" " ->checkout();\n\n" "return view('your-checkout-view', [\n" " 'checkout' => $checkout,\n" -"]);\n" +"]);" +msgstr "" + +# P +#: ./docs/8.x/billing.md:1054 +#: ./docs/9.x/billing.md:1163 +#: ./docs/10.x/billing.md:1343 +#: ./docs/11.x/billing.md:1340 +#: ./docs/master/billing.md:1343 +#~ msgid "" +#~ msgstr "" + +# CODE +#: ./docs/10.x/billing.md:1055 +#: ./docs/11.x/billing.md:1052 +#: ./docs/master/billing.md:1055 +msgid "use Laravel\\Cashier\\Cashier;\n\n" +"/**\n" +" * Register any application services.\n" +" */\n" +"public function register(): void\n" +"{\n" +" Cashier::keepPastDueSubscriptionsActive();\n" +" Cashier::keepIncompleteSubscriptionsActive();\n" +"}" msgstr "" -#: docs/10.x/billing.md:block 367 (header) +# H4 +#: ./docs/8.x/billing.md:1055 +#: ./docs/9.x/billing.md:1164 +#: ./docs/10.x/billing.md:1344 +#: ./docs/11.x/billing.md:1341 +#: ./docs/master/billing.md:1344 msgid "Reporting Usage" msgstr "" -#: docs/10.x/billing.md:block 368 (paragraph) +# P +#: ./docs/8.x/billing.md:1057 +#: ./docs/9.x/billing.md:1166 +#: ./docs/10.x/billing.md:1346 +#: ./docs/11.x/billing.md:1343 +#: ./docs/master/billing.md:1346 msgid "As your customer uses your application, you will report their usage to Stripe so that they can be billed accurately. To increment the usage of a metered subscription, you may use the `reportUsage` method:" msgstr "" -#: docs/10.x/billing.md:block 369 (code) +# CODE +#: ./docs/8.x/billing.md:1059 +#: ./docs/9.x/billing.md:1168 +#: ./docs/10.x/billing.md:1348 +#: ./docs/11.x/billing.md:1345 +#: ./docs/master/billing.md:1348 msgid "$user = User::find(1);\n\n" -"$user->subscription('default')->reportUsage();\n" +"$user->subscription('default')->reportUsage();" msgstr "" -#: docs/10.x/billing.md:block 370 (paragraph) +# P +#: ./docs/8.x/billing.md:1063 +#: ./docs/9.x/billing.md:1172 +#: ./docs/10.x/billing.md:1352 +#: ./docs/11.x/billing.md:1349 +#: ./docs/master/billing.md:1352 msgid "By default, a \"usage quantity\" of 1 is added to the billing period. Alternatively, you may pass a specific amount of \"usage\" to add to the customer's usage for the billing period:" msgstr "" -#: docs/10.x/billing.md:block 371 (code) +# CODE +#: ./docs/8.x/billing.md:1065 +#: ./docs/9.x/billing.md:1174 +#: ./docs/10.x/billing.md:1354 +#: ./docs/11.x/billing.md:1351 +#: ./docs/master/billing.md:1354 msgid "$user = User::find(1);\n\n" -"$user->subscription('default')->reportUsage(15);\n" +"$user->subscription('default')->reportUsage(15);" msgstr "" -#: docs/10.x/billing.md:block 372 (paragraph) +# P +#: ./docs/8.x/billing.md:1069 +#: ./docs/9.x/billing.md:1178 +#: ./docs/10.x/billing.md:1358 +#: ./docs/11.x/billing.md:1355 +#: ./docs/master/billing.md:1358 msgid "If your application offers multiple prices on a single subscription, you will need to use the `reportUsageFor` method to specify the metered price you want to report usage for:" msgstr "" -#: docs/10.x/billing.md:block 373 (code) +# P +#: ./docs/9.x/billing.md:1069 +#: ./docs/10.x/billing.md:1249 +#: ./docs/11.x/billing.md:1246 +#: ./docs/master/billing.md:1249 +msgid "By default, Stripe will prorate charges when adding or removing prices from a subscription with multiple products. If you would like to make a price adjustment without proration, you should chain the `noProrate` method onto your price operation:" +msgstr "" + +# CODE +#: ./docs/8.x/billing.md:1071 +#: ./docs/9.x/billing.md:1180 +#: ./docs/10.x/billing.md:1360 +#: ./docs/11.x/billing.md:1357 +#: ./docs/master/billing.md:1360 msgid "$user = User::find(1);\n\n" -"$user->subscription('default')->reportUsageFor('price_metered', 15);\n" +"$user->subscription('default')->reportUsageFor('price_metered', 15);" msgstr "" -#: docs/10.x/billing.md:block 374 (paragraph) +# P +#: ./docs/8.x/billing.md:1075 +#: ./docs/9.x/billing.md:1184 +#: ./docs/10.x/billing.md:1364 +#: ./docs/11.x/billing.md:1361 +#: ./docs/master/billing.md:1364 msgid "Sometimes, you may need to update usage which you have previously reported. To accomplish this, you may pass a timestamp or a `DateTimeInterface` instance as the second parameter to `reportUsage`. When doing so, Stripe will update the usage that was reported at that given time. You can continue to update previous usage records as the given date and time is still within the current billing period:" msgstr "" -#: docs/10.x/billing.md:block 375 (code) +# CODE +#: ./docs/8.x/billing.md:1077 +#: ./docs/9.x/billing.md:1186 +#: ./docs/10.x/billing.md:1366 +#: ./docs/11.x/billing.md:1363 +#: ./docs/master/billing.md:1366 msgid "$user = User::find(1);\n\n" -"$user->subscription('default')->reportUsage(5, $timestamp);\n" -msgstr "" - -#: docs/10.x/billing.md:block 377 (header) +"$user->subscription('default')->reportUsage(5, $timestamp);" +msgstr "" + +# P +#: ./docs/8.x/billing.md:1081 +#: ./docs/9.x/billing.md:1190 +#: ./docs/10.x/billing.md:1370 +#: ./docs/11.x/billing.md:1367 +#: ./docs/master/billing.md:1370 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/8.x/billing.md:1082 +#: ./docs/9.x/billing.md:1191 +#: ./docs/10.x/billing.md:1371 +#: ./docs/11.x/billing.md:1368 +#: ./docs/master/billing.md:1371 msgid "Retrieving Usage Records" msgstr "" -#: docs/10.x/billing.md:block 378 (paragraph) +# P +#: ./docs/8.x/billing.md:1084 +#: ./docs/9.x/billing.md:1193 +#: ./docs/10.x/billing.md:1373 +#: ./docs/11.x/billing.md:1370 +#: ./docs/master/billing.md:1373 msgid "To retrieve a customer's past usage, you may use a subscription instance's `usageRecords` method:" msgstr "" -#: docs/10.x/billing.md:block 379 (code) +# CODE +#: ./docs/8.x/billing.md:1086 +#: ./docs/9.x/billing.md:1195 +#: ./docs/10.x/billing.md:1375 +#: ./docs/11.x/billing.md:1372 +#: ./docs/master/billing.md:1375 msgid "$user = User::find(1);\n\n" -"$usageRecords = $user->subscription('default')->usageRecords();\n" +"$usageRecords = $user->subscription('default')->usageRecords();" msgstr "" -#: docs/10.x/billing.md:block 380 (paragraph) +# P +#: ./docs/8.x/billing.md:1090 +#: ./docs/9.x/billing.md:1199 +#: ./docs/10.x/billing.md:1379 +#: ./docs/11.x/billing.md:1376 +#: ./docs/master/billing.md:1379 msgid "If your application offers multiple prices on a single subscription, you may use the `usageRecordsFor` method to specify the metered price that you wish to retrieve usage records for:" msgstr "" -#: docs/10.x/billing.md:block 381 (code) +# CODE +#: ./docs/8.x/billing.md:1092 +#: ./docs/9.x/billing.md:1201 +#: ./docs/10.x/billing.md:1381 +#: ./docs/11.x/billing.md:1378 +#: ./docs/master/billing.md:1381 msgid "$user = User::find(1);\n\n" -"$usageRecords = $user->subscription('default')->usageRecordsFor('price_metered');\n" +"$usageRecords = $user->subscription('default')->usageRecordsFor('price_metered');" msgstr "" -#: docs/10.x/billing.md:block 382 (paragraph) +# P +#: ./docs/8.x/billing.md:1096 +#: ./docs/9.x/billing.md:1205 +#: ./docs/10.x/billing.md:1385 +#: ./docs/11.x/billing.md:1382 +#: ./docs/master/billing.md:1385 msgid "The `usageRecords` and `usageRecordsFor` methods return a Collection instance containing an associative array of usage records. You may iterate over this array to display a customer's total usage:" msgstr "" -#: docs/10.x/billing.md:block 383 (code) +# CODE +#: ./docs/8.x/billing.md:1098 +#: ./docs/9.x/billing.md:1207 +#: ./docs/10.x/billing.md:1387 +#: ./docs/11.x/billing.md:1384 +#: ./docs/master/billing.md:1387 msgid "@foreach ($usageRecords as $usageRecord)\n" " - Period Starting: {{ $usageRecord['period']['start'] }}\n" " - Period Ending: {{ $usageRecord['period']['end'] }}\n" " - Total Usage: {{ $usageRecord['total_usage'] }}\n" -"@endforeach\n" +"@endforeach" msgstr "" -#: docs/10.x/billing.md:block 384 (paragraph) +# P +#: ./docs/8.x/billing.md:1104 +#: ./docs/9.x/billing.md:1213 +#: ./docs/10.x/billing.md:1393 +#: ./docs/11.x/billing.md:1390 +#: ./docs/master/billing.md:1393 msgid "For a full reference of all usage data returned and how to use Stripe's cursor based pagination, please consult [the official Stripe API documentation](https://stripe.com/docs/api/usage_records/subscription_item_summary_list)." msgstr "" -#: docs/10.x/billing.md:block 386 (header) +# P +#: ./docs/8.x/billing.md:1106 +#: ./docs/9.x/billing.md:1215 +#: ./docs/10.x/billing.md:1395 +#: ./docs/11.x/billing.md:1392 +#: ./docs/master/billing.md:1395 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/billing.md:1107 +#: ./docs/9.x/billing.md:1216 +#: ./docs/10.x/billing.md:1396 +#: ./docs/11.x/billing.md:1393 +#: ./docs/master/billing.md:1396 msgid "Subscription Taxes" msgstr "" -#: docs/10.x/billing.md:block 387 (quote) -msgid "**Warning** Instead of calculating Tax Rates manually, you can [automatically calculate taxes using Stripe Tax](#tax-configuration)" +# P +#: ./docs/8.x/billing.md:1109 +#: ./docs/9.x/billing.md:1219 +#: ./docs/10.x/billing.md:1399 +#: ./docs/11.x/billing.md:1396 +#: ./docs/master/billing.md:1399 +msgid "Instead of calculating Tax Rates manually, you can [automatically calculate taxes using Stripe Tax](#tax-configuration)" +msgstr "" + +# P +#: ./docs/9.x/billing.md:1110 +#: ./docs/10.x/billing.md:1290 +#: ./docs/11.x/billing.md:1287 +#: ./docs/master/billing.md:1290 +#~ msgid "" +#~ msgstr "" + +# P +#: ./docs/8.x/billing.md:1111 +#: ./docs/9.x/billing.md:1221 +#: ./docs/10.x/billing.md:1401 +#: ./docs/11.x/billing.md:1398 +#: ./docs/master/billing.md:1401 +msgid "To specify the tax rates a user pays on a subscription, you should implement the `taxRates` method on your billable model and return an array containing the Stripe tax rate IDs. You can define these tax rates in [your Stripe dashboard](https://dashboard.stripe.com/test/tax-rates):" msgstr "" -#: docs/10.x/billing.md:block 388 (paragraph) -msgid "To specify the tax rates a user pays on a subscription, you should implement the `taxRates` method on your billable model and return an array containing the Stripe tax rate IDs. You can define these tax rates in [your Stripe dashboard](https://dashboard.stripe.com/test/tax-rates):" +# H3 +#: ./docs/9.x/billing.md:1111 +#: ./docs/10.x/billing.md:1291 +#: ./docs/11.x/billing.md:1288 +#: ./docs/master/billing.md:1291 +msgid "Multiple Subscriptions" msgstr "" -#: docs/10.x/billing.md:block 389 (code) +# CODE +#: ./docs/8.x/billing.md:1113 +#: ./docs/9.x/billing.md:1223 msgid "/**\n" " * The tax rates that should apply to the customer's subscriptions.\n" " *\n" -" * @return array| id }}\">Download | \n" " \n" " @endforeach\n" -"
I'm looping forever.
\n" -"@endwhile\n" -msgstr "@for ($i = 0; $i < 10; $i++)\n" -" 目前值為 {{ $i }}\n" -"@endfor\n\n" -"@foreach ($users as $user)\n" -"使用者 {{ $user->id }}
\n" -"@endforeach\n\n" -"@forelse ($users as $user)\n" -"無使用者
\n" -"@endforelse\n\n" -"@while (true)\n" -"我會無限循環。
\n" -"@endwhile\n" +"@endwhile" +msgstr "" -#: docs/10.x/blade.md:block 86 (quote) -msgid "**Note** While iterating through a `foreach` loop, you may use the [loop variable](#the-loop-variable) to gain valuable information about the loop, such as whether you are in the first or last iteration through the loop." -msgstr "**Note** 在使用 `foreach` 迴圈迭代時,可以使用[迴圈變數](#the-loop-variable)來取得有關迴圈的有用資訊,如目前是否在迴圈的第一次或最後一次迭代。" +# P +#: ./docs/9.x/blade.md:296 +msgid "You may use the `@sectionMissing` directive to determine if a section does not have content:" +msgstr "" -#: docs/10.x/blade.md:block 87 (paragraph) -msgid "When using loops you may also skip the current iteration or end the loop using the `@continue` and `@break` directives:" -msgstr "在使用迴圈時,我們可以使用 `@continue` 與 `@break` 指示詞來跳過目前的迭代或終止迴圈:" +# P +#: ./docs/8.x/blade.md:301 +#: ./docs/9.x/blade.md:352 +#: ./docs/10.x/blade.md:363 +#: ./docs/11.x/blade.md:364 +#: ./docs/master/blade.md:363 +msgid "While iterating through a `foreach` loop, you may use the [loop variable](#the-loop-variable) to gain valuable information about the loop, such as whether you are in the first or last iteration through the loop." +msgstr "" + +# P +#: ./docs/8.x/blade.md:303 +msgid "When using loops you may also end the loop or skip the current iteration using the `@continue` and `@break` directives:" +msgstr "" + +# P +#: ./docs/10.x/blade.md:304 +#: ./docs/11.x/blade.md:305 +#: ./docs/master/blade.md:304 +#~ msgid "" +#~ msgstr "" + +# H4 +#: ./docs/10.x/blade.md:305 +#: ./docs/11.x/blade.md:306 +#: ./docs/master/blade.md:305 +msgid "Session Directives" +msgstr "" -#: docs/10.x/blade.md:block 88 (code) +# CODE +# CODE: blade +#: ./docs/8.x/blade.md:305 +#: ./docs/9.x/blade.md:356 +#: ./docs/10.x/blade.md:367 +#: ./docs/11.x/blade.md:368 +#: ./docs/master/blade.md:367 msgid "@foreach ($users as $user)\n" " @if ($user->type == 1)\n" " @continue\n" @@ -665,42 +1563,84 @@ msgid "@foreach ($users as $user)\n" " @if ($user->number == 5)\n" " @break\n" " @endif\n" -"@endforeach\n" -msgstr "@foreach ($users as $user)\n" -" @if ($user->type == 1)\n" -" @continue\n" -" @endif\n\n" -"This is user {{ $user->id }}
\n" -"@endforeach\n" -msgstr "@foreach ($users as $user)\n" -" @if ($loop->first)\n" -" 第一次迭代。\n" -" @endif\n\n" -" @if ($loop->last)\n" -" 最後一次迭代。\n" -" @endif\n\n" -"使用者 {{ $user->id }}
\n" -"@endforeach\n" +"@endforeach" +msgstr "" -#: docs/10.x/blade.md:block 95 (paragraph) +# P +#: ./docs/8.x/blade.md:344 +#: ./docs/9.x/blade.md:401 +#: ./docs/10.x/blade.md:412 +#: ./docs/11.x/blade.md:413 +#: ./docs/master/blade.md:412 msgid "If you are in a nested loop, you may access the parent loop's `$loop` variable via the `parent` property:" -msgstr "若在巢狀迴圈中,可以通過 `parent` 屬性來存取上層迴圈的 `$loop` 變數:" +msgstr "" -#: docs/10.x/blade.md:block 96 (code) +# CODE +# CODE: blade +#: ./docs/8.x/blade.md:346 +#: ./docs/9.x/blade.md:403 +#: ./docs/10.x/blade.md:414 +#: ./docs/11.x/blade.md:415 +#: ./docs/master/blade.md:414 msgid "@foreach ($users as $user)\n" " @foreach ($user->posts as $post)\n" " @if ($loop->parent->first)\n" " This is the first iteration of the parent loop.\n" " @endif\n" " @endforeach\n" -"@endforeach\n" -msgstr "@foreach ($users as $user)\n" -" @foreach ($user->posts as $post)\n" -" @if ($loop->parent->first)\n" -" 這是上層迴圈的第一次迭代。\n" -" @endif\n" -" @endforeach\n" -"@endforeach\n" +"@endforeach" +msgstr "" -#: docs/10.x/blade.md:block 97 (paragraph) +# P +#: ./docs/8.x/blade.md:354 +#: ./docs/9.x/blade.md:413 +#: ./docs/10.x/blade.md:424 +#: ./docs/11.x/blade.md:425 +#: ./docs/master/blade.md:424 msgid "The `$loop` variable also contains a variety of other useful properties:" -msgstr "`$loop` 變數也包含了其他各種實用的屬性:" - -#: docs/10.x/blade.md:block 98 (table) -msgid "Property" -msgstr "屬性" - -#: docs/10.x/blade.md:block 98 (table) -msgid "Description" -msgstr "說明" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->index`" -msgstr "`$loop->index`" - -#: docs/10.x/blade.md:block 98 (table) -msgid "The index of the current loop iteration (starts at 0)." -msgstr "目前迴圈迭代的索引 (從 0 開始)。" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->iteration`" -msgstr "`$loop->iteration`" - -#: docs/10.x/blade.md:block 98 (table) -msgid "The current loop iteration (starts at 1)." -msgstr "目前的迴圈迭代 (從 1 開始)。" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->remaining`" -msgstr "`$loop->remaining`" - -#: docs/10.x/blade.md:block 98 (table) -msgid "The iterations remaining in the loop." -msgstr "迴圈中剩餘的迭代數。" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->count`" -msgstr "`$loop->count`" - -#: docs/10.x/blade.md:block 98 (table) -msgid "The total number of items in the array being iterated." -msgstr "迭代中陣列內的總項目數。" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->first`" -msgstr "`$loop->first`" - -#: docs/10.x/blade.md:block 98 (table) -msgid "Whether this is the first iteration through the loop." -msgstr "目前是否為迴圈的第一次迭代。" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->last`" -msgstr "`$loop->last`" - -#: docs/10.x/blade.md:block 98 (table) -msgid "Whether this is the last iteration through the loop." -msgstr "目前是否為迴圈的最後一次迭代。" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->even`" -msgstr "`$loop->even`" - -#: docs/10.x/blade.md:block 98 (table) -msgid "Whether this is an even iteration through the loop." -msgstr "目前是否為迴圈的偶數次迭代。" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->odd`" -msgstr "`$loop->odd`" - -#: docs/10.x/blade.md:block 98 (table) -msgid "Whether this is an odd iteration through the loop." -msgstr "目前是否為迴圈的奇數次迭代。" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->depth`" -msgstr "`$loop->depth`" - -#: docs/10.x/blade.md:block 98 (table) -msgid "The nesting level of the current loop." -msgstr "目前迴圈的巢狀深度等級。" - -#: docs/10.x/blade.md:block 98 (table) -msgid "`$loop->parent`" -msgstr "`$loop->parent`" +msgstr "" -#: docs/10.x/blade.md:block 98 (table) -msgid "When in a nested loop, the parent's loop variable." -msgstr "若在巢狀迴圈內,即代表上層的迴圈變數。" +# P +#: ./docs/9.x/blade.md:354 +#: ./docs/10.x/blade.md:365 +#: ./docs/11.x/blade.md:366 +#: ./docs/master/blade.md:365 +msgid "When using loops you may also skip the current iteration or end the loop using the `@continue` and `@break` directives:" +msgstr "" -#: docs/10.x/blade.md:block 100 (header) -msgid "Conditional Classes & Styles" -msgstr "按條件顯示/隱藏 Class 與 Style" +# P +#: ./docs/8.x/blade.md:369 +#: ./docs/9.x/blade.md:428 +#: ./docs/10.x/blade.md:439 +#: ./docs/11.x/blade.md:444 +#: ./docs/master/blade.md:439 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/blade.md:370 +msgid "Conditional Classes" +msgstr "" -#: docs/10.x/blade.md:block 101 (paragraph) +# P +#: ./docs/8.x/blade.md:372 +#: ./docs/9.x/blade.md:431 +#: ./docs/10.x/blade.md:442 +#: ./docs/11.x/blade.md:447 +#: ./docs/master/blade.md:442 msgid "The `@class` directive conditionally compiles a CSS class string. The directive accepts an array of classes where the array key contains the class or classes you wish to add, while the value is a boolean expression. If the array element has a numeric key, it will always be included in the rendered class list:" -msgstr "`@class` 指示詞可以有條件地編譯 CSS class 字串。`@class` 指示詞接受一組包含 class 的陣列,其中,陣列的索引鍵代表欲新增的 class,陣列值則是一個布林運算式。若陣列的元素有數字索引鍵,則該元素一定會被加到轉譯後的 Class 列表上:" +msgstr "" -#: docs/10.x/blade.md:block 102 (code) +# CODE +# CODE: blade +#: ./docs/8.x/blade.md:374 +#: ./docs/9.x/blade.md:433 +#: ./docs/10.x/blade.md:444 +#: ./docs/11.x/blade.md:449 +#: ./docs/master/blade.md:444 msgid "@php\n" " $isActive = false;\n" " $hasError = true;\n" @@ -851,635 +1734,1216 @@ msgid "@php\n" " 'text-gray-500' => ! $isActive,\n" " 'bg-red' => $hasError,\n" "])>\n\n" -"\n" -msgstr "@php\n" -" $isActive = false;\n" -" $hasError = true;\n" -"@endphp\n\n" -" $isActive,\n" -" 'text-gray-500' => ! $isActive,\n" -" 'bg-red' => $hasError,\n" -"])>\n\n" -"\n" - -#: docs/10.x/blade.md:block 103 (paragraph) -msgid "Likewise, the `@style` directive may be used to conditionally add inline CSS styles to an HTML element:" -msgstr "類似地,`@style` 指示詞可用來依照條件在 HTML 元素內顯示或隱藏內嵌 CSS 樣式:" - -#: docs/10.x/blade.md:block 104 (code) -msgid "@php\n" -" $isActive = true;\n" -"@endphp\n\n" -" $isActive,\n" -"])>\n\n" -"\n" -msgstr "@php\n" -" $isActive = true;\n" -"@endphp\n\n" -" $isActive,\n" -"])>\n\n" -"\n" - -#: docs/10.x/blade.md:block 106 (header) -msgid "Additional Attributes" -msgstr "額外屬性" - -#: docs/10.x/blade.md:block 107 (paragraph) -msgid "For convenience, you may use the `@checked` directive to easily indicate if a given HTML checkbox input is \"checked\". This directive will echo `checked` if the provided condition evaluates to `true`:" -msgstr "為了方便起見,可以使用 `@checked` 指示詞用來可輕鬆地標示給定 HTML 勾選框為「^[已勾選](Checked)」。這個指示詞會在條件為 `true` 時 Echo `checked`:" - -#: docs/10.x/blade.md:block 108 (code) -msgid "active)) />\n" -msgstr "active)) />\n" - -#: docs/10.x/blade.md:block 109 (paragraph) -msgid "Likewise, the `@selected` directive may be used to indicate if a given select option should be \"selected\":" -msgstr "類似地,`@selected` 指示詞可用來表示給定 Select 選項應為「^[已選擇](Selected)」:" - -#: docs/10.x/blade.md:block 110 (code) -msgid "\n" -msgstr "\n" - -#: docs/10.x/blade.md:block 111 (paragraph) -msgid "Additionally, the `@disabled` directive may be used to indicate if a given element should be \"disabled\":" -msgstr "此外,可使用 `@disabled` 指示詞來表示給定元素應為「disabled」:" - -#: docs/10.x/blade.md:block 112 (code) -msgid "\n" -msgstr "\n" - -#: docs/10.x/blade.md:block 113 (paragraph) -msgid "Moreover, the `@readonly` directive may be used to indicate if a given element should be \"readonly\":" -msgstr "此外,使用 `@readonly` 指示詞可用來表示給定元素應為「readonly」:" - -#: docs/10.x/blade.md:block 114 (code) -msgid "isNotAdmin()) />\n" -msgstr "isNotAdmin()) />\n" - -#: docs/10.x/blade.md:block 115 (paragraph) -msgid "In addition, the `@required` directive may be used to indicate if a given element should be \"required\":" -msgstr "此外,`@required` 指示詞可用來表示給定元素應為「required」:" - -#: docs/10.x/blade.md:block 116 (code) -msgid "isAdmin()) />\n" -msgstr "isAdmin()) />\n" +"" +msgstr "" -#: docs/10.x/blade.md:block 118 (header) +# P +#: ./docs/8.x/blade.md:388 +#: ./docs/9.x/blade.md:512 +#: ./docs/10.x/blade.md:523 +#: ./docs/11.x/blade.md:534 +#: ./docs/master/blade.md:523 +#~ msgid "" +#~ msgstr "" + +# H3 +#: ./docs/8.x/blade.md:389 +#: ./docs/9.x/blade.md:513 +#: ./docs/10.x/blade.md:524 +#: ./docs/11.x/blade.md:535 +#: ./docs/master/blade.md:524 msgid "Including Subviews" -msgstr "Include 子 View" +msgstr "" -#: docs/10.x/blade.md:block 119 (quote) -msgid "**Note** While you're free to use the `@include` directive, Blade [components](#components) provide similar functionality and offer several benefits over the `@include` directive such as data and attribute binding." -msgstr "**Note** 雖然可以使用 `@include` 指示詞,但 Blade 的[元件](#components)提供了類似的功能,且比起 `@include` 指示詞來說功能更強,可繫結資料與屬性。" +# P +#: ./docs/8.x/blade.md:391 +#: ./docs/9.x/blade.md:516 +#: ./docs/10.x/blade.md:527 +#: ./docs/11.x/blade.md:538 +#: ./docs/master/blade.md:527 +msgid "While you're free to use the `@include` directive, Blade [components](#components) provide similar functionality and offer several benefits over the `@include` directive such as data and attribute binding." +msgstr "" -#: docs/10.x/blade.md:block 120 (paragraph) +# P +#: ./docs/8.x/blade.md:393 +#: ./docs/9.x/blade.md:518 +#: ./docs/10.x/blade.md:529 +#: ./docs/11.x/blade.md:540 +#: ./docs/master/blade.md:529 msgid "Blade's `@include` directive allows you to include a Blade view from within another view. All variables that are available to the parent view will be made available to the included view:" -msgstr "Blade 的 `@include` 指示詞可用來在 Blade View 中包含另一個 View。所有上層 View 中可用的變數在 Include 的 View 當中都保持可用:" +msgstr "" -#: docs/10.x/blade.md:block 121 (code) +# CODE: html +# CODE: blade +#: ./docs/8.x/blade.md:395 +#: ./docs/9.x/blade.md:520 +#: ./docs/10.x/blade.md:531 +#: ./docs/11.x/blade.md:542 +#: ./docs/master/blade.md:531 msgid "