You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: artisan.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -649,7 +649,7 @@ Sometimes, you may need more manual control over how a progress bar is advanced.
649
649
650
650
$bar->finish();
651
651
652
-
> [!NOTE]
652
+
> [!NOTE]
653
653
> For more advanced options, check out the [Symfony Progress Bar component documentation](https://symfony.com/doc/7.0/components/console/helpers/progressbar.html).
Copy file name to clipboardExpand all lines: billing.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -251,7 +251,7 @@ Offering product and subscription billing via your application can be intimidati
251
251
To charge customers for non-recurring, single-charge products, we'll utilize Cashier to direct customers to Stripe Checkout, where they will provide their payment details and confirm their purchase. Once the payment has been made via Checkout, the customer will be redirected to a success URL of your choosing within your application:
252
252
253
253
use Illuminate\Http\Request;
254
-
254
+
255
255
Route::get('/checkout', function (Request $request) {
256
256
$stripePriceId = 'price_deluxe_album';
257
257
@@ -276,11 +276,11 @@ If necessary, the `checkout` method will automatically create a customer in Stri
276
276
When selling products, it's common to keep track of completed orders and purchased products via `Cart` and `Order` models defined by your own application. When redirecting customers to Stripe Checkout to complete a purchase, you may need to provide an existing order identifier so that you can associate the completed purchase with the corresponding order when the customer is redirected back to your application.
277
277
278
278
To accomplish this, you may provide an array of `metadata` to the `checkout` method. Let's imagine that a pending `Order` is created within our application when a user begins the checkout process. Remember, the `Cart` and `Order` models in this example are illustrative and not provided by Cashier. You are free to implement these concepts based on the needs of your own application:
279
-
279
+
280
280
use App\Models\Cart;
281
281
use App\Models\Order;
282
282
use Illuminate\Http\Request;
283
-
283
+
284
284
Route::get('/cart/{cart}/checkout', function (Request $request, Cart $cart) {
285
285
$order = Order::create([
286
286
'cart_id' => $cart->id,
@@ -340,7 +340,7 @@ To learn how to sell subscriptions using Cashier and Stripe Checkout, let's cons
340
340
First, let's discover how a customer can subscribe to our services. Of course, you can imagine the customer might click a "subscribe" button for the Basic plan on our application's pricing page. This button or link should direct the user to a Laravel route which creates the Stripe Checkout session for their chosen plan:
341
341
342
342
use Illuminate\Http\Request;
343
-
343
+
344
344
Route::get('/subscription-checkout', function (Request $request) {
@@ -2215,7 +2215,7 @@ Some payment methods require additional data in order to confirm payments. For e
2215
2215
$subscription->withPaymentConfirmationOptions([
2216
2216
'mandate_data' => '...',
2217
2217
])->swap('price_xxx');
2218
-
2218
+
2219
2219
You may consult the [Stripe API documentation](https://stripe.com/docs/api/payment_intents/confirm) to review all of the options accepted when confirming payments.
Copy file name to clipboardExpand all lines: cashier-paddle.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ After defining your model, you may instruct Cashier to use your custom model via
201
201
<aname="quickstart-selling-products"></a>
202
202
### Selling Products
203
203
204
-
> [!NOTE]
204
+
> [!NOTE]
205
205
> Before utilizing Paddle Checkout, you should define Products with fixed prices in your Paddle dashboard. In addition, you should [configure Paddle's webhook handling](#handling-paddle-webhooks).
206
206
207
207
Offering product and subscription billing via your application can be intimidating. However, thanks to Cashier and [Paddle's Checkout Overlay](https://www.paddle.com/billing/checkout), you can easily build modern, robust payment integrations.
@@ -235,11 +235,11 @@ In the `buy` view, we will include a button to display the Checkout Overlay. The
235
235
When selling products, it's common to keep track of completed orders and purchased products via `Cart` and `Order` models defined by your own application. When redirecting customers to Paddle's Checkout Overlay to complete a purchase, you may need to provide an existing order identifier so that you can associate the completed purchase with the corresponding order when the customer is redirected back to your application.
236
236
237
237
To accomplish this, you may provide an array of custom data to the `checkout` method. Let's imagine that a pending `Order` is created within our application when a user begins the checkout process. Remember, the `Cart` and `Order` models in this example are illustrative and not provided by Cashier. You are free to implement these concepts based on the needs of your own application:
238
-
238
+
239
239
use App\Models\Cart;
240
240
use App\Models\Order;
241
241
use Illuminate\Http\Request;
242
-
242
+
243
243
Route::get('/cart/{cart}/checkout', function (Request $request, Cart $cart) {
Copy file name to clipboardExpand all lines: collections.md
+20-20Lines changed: 20 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ As mentioned above, the `collect` helper returns a new `Illuminate\Support\Colle
31
31
32
32
$collection = collect([1, 2, 3]);
33
33
34
-
> [!NOTE]
34
+
> [!NOTE]
35
35
> The results of [Eloquent](/docs/{{version}}/eloquent) queries are always returned as `Collection` instances.
36
36
37
37
<aname="extending-collections"></a>
@@ -432,7 +432,7 @@ The `collect` method is primarily useful for converting [lazy collections](#lazy
432
432
433
433
// [1, 2, 3]
434
434
435
-
> [!NOTE]
435
+
> [!NOTE]
436
436
> The `collect` method is especially useful when you have an instance of `Enumerable` and need a non-lazy collection instance. Since `collect()` is part of the `Enumerable` contract, you can safely use it to get a `Collection` instance.
437
437
438
438
<aname="method-combine"></a>
@@ -525,7 +525,7 @@ The `containsOneItem` method determines whether the collection contains a single
525
525
526
526
This method has the same signature as the [`contains`](#method-contains) method; however, all values are compared using "strict" comparisons.
527
527
528
-
> [!NOTE]
528
+
> [!NOTE]
529
529
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-contains).
530
530
531
531
<aname="method-count"></a>
@@ -636,7 +636,7 @@ The `diff` method compares the collection against another collection or a plain
636
636
637
637
// [1, 3, 5]
638
638
639
-
> [!NOTE]
639
+
> [!NOTE]
640
640
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-diff).
641
641
642
642
<aname="method-diffassoc"></a>
@@ -856,7 +856,7 @@ Primitive types such as `string`, `int`, `float`, `bool`, and `array` may also b
856
856
857
857
return $collection->ensure('int');
858
858
859
-
> [!WARNING]
859
+
> [!WARNING]
860
860
> The `ensure` method does not guarantee that elements of different types will not be added to the collection at a later time.
861
861
862
862
<aname="method-every"></a>
@@ -895,7 +895,7 @@ The `except` method returns all items in the collection except for those with th
895
895
896
896
For the inverse of `except`, see the [only](#method-only) method.
897
897
898
-
> [!NOTE]
898
+
> [!NOTE]
899
899
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-except).
900
900
901
901
<aname="method-filter"></a>
@@ -1078,7 +1078,7 @@ The `forget` method removes an item from the collection by its key:
1078
1078
1079
1079
// ['framework' => 'laravel']
1080
1080
1081
-
> [!WARNING]
1081
+
> [!WARNING]
1082
1082
> Unlike most other collection methods, `forget` does not return a new modified collection; it modifies the collection it is called on.
1083
1083
1084
1084
<aname="method-forpage"></a>
@@ -1281,7 +1281,7 @@ The `intersect` method removes any values from the original collection that are
1281
1281
1282
1282
// [0 => 'Desk', 2 => 'Chair']
1283
1283
1284
-
> [!NOTE]
1284
+
> [!NOTE]
1285
1285
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-intersect).
1286
1286
1287
1287
<aname="method-intersectAssoc"></a>
@@ -1470,7 +1470,7 @@ The `map` method iterates through the collection and passes each value to the gi
1470
1470
1471
1471
// [2, 4, 6, 8, 10]
1472
1472
1473
-
> [!WARNING]
1473
+
> [!WARNING]
1474
1474
> Like most other collection methods, `map` returns a new collection instance; it does not modify the collection it is called on. If you want to transform the original collection, use the [`transform`](#method-transform) method.
1475
1475
1476
1476
<aname="method-mapinto"></a>
@@ -1750,7 +1750,7 @@ The `only` method returns the items in the collection with the specified keys:
1750
1750
1751
1751
For the inverse of `only`, see the [except](#method-except) method.
1752
1752
1753
-
> [!NOTE]
1753
+
> [!NOTE]
1754
1754
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-only).
1755
1755
1756
1756
<aname="method-pad"></a>
@@ -2322,7 +2322,7 @@ You may also pass a simple value to the `skipUntil` method to skip all items unt
2322
2322
2323
2323
// [3, 4]
2324
2324
2325
-
> [!WARNING]
2325
+
> [!WARNING]
2326
2326
> If the given value is not found or the callback never returns `true`, the `skipUntil` method will return an empty collection.
2327
2327
2328
2328
<aname="method-skipwhile"></a>
@@ -2340,7 +2340,7 @@ The `skipWhile` method skips over items from the collection while the given call
2340
2340
2341
2341
// [4]
2342
2342
2343
-
> [!WARNING]
2343
+
> [!WARNING]
2344
2344
> If the callback never returns `false`, the `skipWhile` method will return an empty collection.
2345
2345
2346
2346
<aname="method-slice"></a>
@@ -2449,7 +2449,7 @@ The `sort` method sorts the collection. The sorted collection keeps the original
2449
2449
2450
2450
If your sorting needs are more advanced, you may pass a callback to `sort` with your own algorithm. Refer to the PHP documentation on [`uasort`](https://secure.php.net/manual/en/function.uasort.php#refsect1-function.uasort-parameters), which is what the collection's `sort` method calls utilizes internally.
2451
2451
2452
-
> [!NOTE]
2452
+
> [!NOTE]
2453
2453
> If you need to sort a collection of nested arrays or objects, see the [`sortBy`](#method-sortby) and [`sortByDesc`](#method-sortbydesc) methods.
2454
2454
2455
2455
<aname="method-sortby"></a>
@@ -2793,7 +2793,7 @@ You may also pass a simple value to the `takeUntil` method to get the items unti
2793
2793
2794
2794
// [1, 2]
2795
2795
2796
-
> [!WARNING]
2796
+
> [!WARNING]
2797
2797
> If the given value is not found or the callback never returns `true`, the `takeUntil` method will return all items in the collection.
2798
2798
2799
2799
<aname="method-takewhile"></a>
@@ -2811,7 +2811,7 @@ The `takeWhile` method returns items in the collection until the given callback
2811
2811
2812
2812
// [1, 2]
2813
2813
2814
-
> [!WARNING]
2814
+
> [!WARNING]
2815
2815
> If the callback never returns `false`, the `takeWhile` method will return all items in the collection.
2816
2816
2817
2817
<aname="method-tap"></a>
@@ -2856,7 +2856,7 @@ The `toArray` method converts the collection into a plain PHP `array`. If the co
2856
2856
]
2857
2857
*/
2858
2858
2859
-
> [!WARNING]
2859
+
> [!WARNING]
2860
2860
> `toArray` also converts all of the collection's nested objects that are an instance of `Arrayable` to an array. If you want to get the raw array underlying the collection, use the [`all`](#method-all) method instead.
2861
2861
2862
2862
<aname="method-tojson"></a>
@@ -2885,7 +2885,7 @@ The `transform` method iterates over the collection and calls the given callback
2885
2885
2886
2886
// [2, 4, 6, 8, 10]
2887
2887
2888
-
> [!WARNING]
2888
+
> [!WARNING]
2889
2889
> Unlike most other collection methods, `transform` modifies the collection itself. If you wish to create a new collection instead, use the [`map`](#method-map) method.
2890
2890
2891
2891
<aname="method-undot"></a>
@@ -2989,7 +2989,7 @@ Finally, you may also pass your own closure to the `unique` method to specify wh
2989
2989
2990
2990
The `unique` method uses "loose" comparisons when checking item values, meaning a string with an integer value will be considered equal to an integer of the same value. Use the [`uniqueStrict`](#method-uniquestrict) method to filter using "strict" comparisons.
2991
2991
2992
-
> [!NOTE]
2992
+
> [!NOTE]
2993
2993
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-unique).
2994
2994
2995
2995
<aname="method-uniquestrict"></a>
@@ -3498,7 +3498,7 @@ Likewise, we can use the `sum` higher order message to gather the total number o
3498
3498
<aname="lazy-collection-introduction"></a>
3499
3499
### Introduction
3500
3500
3501
-
> [!WARNING]
3501
+
> [!WARNING]
3502
3502
> Before learning more about Laravel's lazy collections, take some time to familiarize yourself with [PHP generators](https://www.php.net/manual/en/language.generators.overview.php).
3503
3503
3504
3504
To supplement the already powerful `Collection` class, the `LazyCollection` class leverages PHP's [generators](https://www.php.net/manual/en/language.generators.overview.php) to allow you to work with very large datasets while keeping memory usage low.
@@ -3689,7 +3689,7 @@ Almost all methods available on the `Collection` class are also available on the
3689
3689
3690
3690
</div>
3691
3691
3692
-
> [!WARNING]
3692
+
> [!WARNING]
3693
3693
> Methods that mutate the collection (such as `shift`, `pop`, `prepend` etc.) are **not** available on the `LazyCollection` class.
Copy file name to clipboardExpand all lines: configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ Laravel's default `.env` file contains some common configuration values that may
51
51
52
52
If you are developing with a team, you may wish to continue including and updating the `.env.example` file with your application. By putting placeholder values in the example configuration file, other developers on your team can clearly see which environment variables are needed to run your application.
53
53
54
-
> [!NOTE]
54
+
> [!NOTE]
55
55
> Any variable in your `.env` file can be overridden by external environment variables such as server-level or system-level environment variables.
Copy file name to clipboardExpand all lines: container.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -231,7 +231,7 @@ Sometimes you may have two classes that utilize the same interface, but you wish
231
231
Sometimes you may have a class that receives some injected classes, but also needs an injected primitive value such as an integer. You may easily use contextual binding to inject any value your class may need:
Copy file name to clipboardExpand all lines: context.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -318,7 +318,7 @@ public function boot(): void
318
318
}
319
319
```
320
320
321
-
> [!NOTE]
321
+
> [!NOTE]
322
322
> You should not use the `Context` facade within the `dehydrating` callback, as that will change the context of the current process. Ensure you only make changes to the repository passed to the callback.
323
323
324
324
<aname="hydrated"></a>
@@ -346,5 +346,5 @@ public function boot(): void
346
346
}
347
347
```
348
348
349
-
> [!NOTE]
349
+
> [!NOTE]
350
350
> You should not use the `Context` facade within the `hydrated` callback and instead ensure you only make changes to the repository passed to the callback.
Copy file name to clipboardExpand all lines: database.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ By default, foreign key constraints are enabled for SQLite connections. If you w
50
50
DB_FOREIGN_KEYS=false
51
51
```
52
52
53
-
> [!NOTE]
53
+
> [!NOTE]
54
54
> If you use the [Laravel installer](/docs/{{version}}/installation#creating-a-laravel-project) to create your Laravel application and select SQLite as your database, Laravel will automatically create a `database/database.sqlite` file and run the default [database migrations](/docs/{{version}}/migrations) for you.
0 commit comments