Skip to content

Fix whitespaces #9780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion artisan.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ Sometimes, you may need more manual control over how a progress bar is advanced.

$bar->finish();

> [!NOTE]
> [!NOTE]
> For more advanced options, check out the [Symfony Progress Bar component documentation](https://symfony.com/doc/7.0/components/console/helpers/progressbar.html).

<a name="registering-commands"></a>
Expand Down
4 changes: 2 additions & 2 deletions authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ For complex query conditions, you may provide a closure in your array of credent
use Illuminate\Database\Eloquent\Builder;

if (Auth::attempt([
'email' => $email,
'password' => $password,
'email' => $email,
'password' => $password,
fn (Builder $query) => $query->has('activeSubscription'),
])) {
// Authentication was successful...
Expand Down
10 changes: 5 additions & 5 deletions billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Offering product and subscription billing via your application can be intimidati
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:

use Illuminate\Http\Request;

Route::get('/checkout', function (Request $request) {
$stripePriceId = 'price_deluxe_album';

Expand All @@ -276,11 +276,11 @@ If necessary, the `checkout` method will automatically create a customer in Stri
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.

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:

use App\Models\Cart;
use App\Models\Order;
use Illuminate\Http\Request;

Route::get('/cart/{cart}/checkout', function (Request $request, Cart $cart) {
$order = Order::create([
'cart_id' => $cart->id,
Expand Down Expand Up @@ -340,7 +340,7 @@ To learn how to sell subscriptions using Cashier and Stripe Checkout, let's cons
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:

use Illuminate\Http\Request;

Route::get('/subscription-checkout', function (Request $request) {
return $request->user()
->newSubscription('default', 'price_basic_monthly')
Expand Down Expand Up @@ -2215,7 +2215,7 @@ Some payment methods require additional data in order to confirm payments. For e
$subscription->withPaymentConfirmationOptions([
'mandate_data' => '...',
])->swap('price_xxx');

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.

<a name="strong-customer-authentication"></a>
Expand Down
6 changes: 3 additions & 3 deletions cashier-paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ After defining your model, you may instruct Cashier to use your custom model via
<a name="quickstart-selling-products"></a>
### Selling Products

> [!NOTE]
> [!NOTE]
> 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).

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.
Expand Down Expand Up @@ -235,11 +235,11 @@ In the `buy` view, we will include a button to display the Checkout Overlay. The
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.

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:

use App\Models\Cart;
use App\Models\Order;
use Illuminate\Http\Request;

Route::get('/cart/{cart}/checkout', function (Request $request, Cart $cart) {
$order = Order::create([
'cart_id' => $cart->id,
Expand Down
40 changes: 20 additions & 20 deletions collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ As mentioned above, the `collect` helper returns a new `Illuminate\Support\Colle

$collection = collect([1, 2, 3]);

> [!NOTE]
> [!NOTE]
> The results of [Eloquent](/docs/{{version}}/eloquent) queries are always returned as `Collection` instances.

<a name="extending-collections"></a>
Expand Down Expand Up @@ -432,7 +432,7 @@ The `collect` method is primarily useful for converting [lazy collections](#lazy

// [1, 2, 3]

> [!NOTE]
> [!NOTE]
> 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.

<a name="method-combine"></a>
Expand Down Expand Up @@ -525,7 +525,7 @@ The `containsOneItem` method determines whether the collection contains a single

This method has the same signature as the [`contains`](#method-contains) method; however, all values are compared using "strict" comparisons.

> [!NOTE]
> [!NOTE]
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-contains).

<a name="method-count"></a>
Expand Down Expand Up @@ -636,7 +636,7 @@ The `diff` method compares the collection against another collection or a plain

// [1, 3, 5]

> [!NOTE]
> [!NOTE]
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-diff).

<a name="method-diffassoc"></a>
Expand Down Expand Up @@ -856,7 +856,7 @@ Primitive types such as `string`, `int`, `float`, `bool`, and `array` may also b

return $collection->ensure('int');

> [!WARNING]
> [!WARNING]
> The `ensure` method does not guarantee that elements of different types will not be added to the collection at a later time.

<a name="method-every"></a>
Expand Down Expand Up @@ -895,7 +895,7 @@ The `except` method returns all items in the collection except for those with th

For the inverse of `except`, see the [only](#method-only) method.

> [!NOTE]
> [!NOTE]
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-except).

<a name="method-filter"></a>
Expand Down Expand Up @@ -1078,7 +1078,7 @@ The `forget` method removes an item from the collection by its key:

// ['framework' => 'laravel']

> [!WARNING]
> [!WARNING]
> Unlike most other collection methods, `forget` does not return a new modified collection; it modifies the collection it is called on.

<a name="method-forpage"></a>
Expand Down Expand Up @@ -1281,7 +1281,7 @@ The `intersect` method removes any values from the original collection that are

// [0 => 'Desk', 2 => 'Chair']

> [!NOTE]
> [!NOTE]
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-intersect).

<a name="method-intersectAssoc"></a>
Expand Down Expand Up @@ -1470,7 +1470,7 @@ The `map` method iterates through the collection and passes each value to the gi

// [2, 4, 6, 8, 10]

> [!WARNING]
> [!WARNING]
> 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.

<a name="method-mapinto"></a>
Expand Down Expand Up @@ -1750,7 +1750,7 @@ The `only` method returns the items in the collection with the specified keys:

For the inverse of `only`, see the [except](#method-except) method.

> [!NOTE]
> [!NOTE]
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-only).

<a name="method-pad"></a>
Expand Down Expand Up @@ -2322,7 +2322,7 @@ You may also pass a simple value to the `skipUntil` method to skip all items unt

// [3, 4]

> [!WARNING]
> [!WARNING]
> If the given value is not found or the callback never returns `true`, the `skipUntil` method will return an empty collection.

<a name="method-skipwhile"></a>
Expand All @@ -2340,7 +2340,7 @@ The `skipWhile` method skips over items from the collection while the given call

// [4]

> [!WARNING]
> [!WARNING]
> If the callback never returns `false`, the `skipWhile` method will return an empty collection.

<a name="method-slice"></a>
Expand Down Expand Up @@ -2449,7 +2449,7 @@ The `sort` method sorts the collection. The sorted collection keeps the original

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.

> [!NOTE]
> [!NOTE]
> If you need to sort a collection of nested arrays or objects, see the [`sortBy`](#method-sortby) and [`sortByDesc`](#method-sortbydesc) methods.

<a name="method-sortby"></a>
Expand Down Expand Up @@ -2793,7 +2793,7 @@ You may also pass a simple value to the `takeUntil` method to get the items unti

// [1, 2]

> [!WARNING]
> [!WARNING]
> If the given value is not found or the callback never returns `true`, the `takeUntil` method will return all items in the collection.

<a name="method-takewhile"></a>
Expand All @@ -2811,7 +2811,7 @@ The `takeWhile` method returns items in the collection until the given callback

// [1, 2]

> [!WARNING]
> [!WARNING]
> If the callback never returns `false`, the `takeWhile` method will return all items in the collection.

<a name="method-tap"></a>
Expand Down Expand Up @@ -2856,7 +2856,7 @@ The `toArray` method converts the collection into a plain PHP `array`. If the co
]
*/

> [!WARNING]
> [!WARNING]
> `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.

<a name="method-tojson"></a>
Expand Down Expand Up @@ -2885,7 +2885,7 @@ The `transform` method iterates over the collection and calls the given callback

// [2, 4, 6, 8, 10]

> [!WARNING]
> [!WARNING]
> 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.

<a name="method-undot"></a>
Expand Down Expand Up @@ -2989,7 +2989,7 @@ Finally, you may also pass your own closure to the `unique` method to specify wh

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.

> [!NOTE]
> [!NOTE]
> This method's behavior is modified when using [Eloquent Collections](/docs/{{version}}/eloquent-collections#method-unique).

<a name="method-uniquestrict"></a>
Expand Down Expand Up @@ -3498,7 +3498,7 @@ Likewise, we can use the `sum` higher order message to gather the total number o
<a name="lazy-collection-introduction"></a>
### Introduction

> [!WARNING]
> [!WARNING]
> 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).

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.
Expand Down Expand Up @@ -3689,7 +3689,7 @@ Almost all methods available on the `Collection` class are also available on the

</div>

> [!WARNING]
> [!WARNING]
> Methods that mutate the collection (such as `shift`, `pop`, `prepend` etc.) are **not** available on the `LazyCollection` class.

<a name="lazy-collection-methods"></a>
Expand Down
2 changes: 1 addition & 1 deletion configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Laravel's default `.env` file contains some common configuration values that may

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.

> [!NOTE]
> [!NOTE]
> Any variable in your `.env` file can be overridden by external environment variables such as server-level or system-level environment variables.

<a name="environment-file-security"></a>
Expand Down
2 changes: 1 addition & 1 deletion container.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Sometimes you may have two classes that utilize the same interface, but you wish
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:

use App\Http\Controllers\UserController;

$this->app->when(UserController::class)
->needs('$variableName')
->give($value);
Expand Down
4 changes: 2 additions & 2 deletions context.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function boot(): void
}
```

> [!NOTE]
> [!NOTE]
> 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.

<a name="hydrated"></a>
Expand Down Expand Up @@ -346,5 +346,5 @@ public function boot(): void
}
```

> [!NOTE]
> [!NOTE]
> 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.
2 changes: 1 addition & 1 deletion controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Let's take a look at an example of a basic controller. A controller may have any
<?php

namespace App\Http\Controllers;

use App\Models\User;
use Illuminate\View\View;

Expand Down
2 changes: 1 addition & 1 deletion database-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Assert that a table in the database does not contain records matching the given
The `assertSoftDeleted` method may be used to assert a given Eloquent model has been "soft deleted":

$this->assertSoftDeleted($user);

<a name="assert-not-deleted"></a>
#### assertNotSoftDeleted

Expand Down
2 changes: 1 addition & 1 deletion database.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ By default, foreign key constraints are enabled for SQLite connections. If you w
DB_FOREIGN_KEYS=false
```

> [!NOTE]
> [!NOTE]
> 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.

<a name="mssql-configuration"></a>
Expand Down
Loading