diff --git a/original-en/billing.md b/original-en/billing.md
index b828e96..ea9202f 100644
--- a/original-en/billing.md
+++ b/original-en/billing.md
@@ -309,7 +309,17 @@ Next, let's build the Checkout success route. This is the route that users will
Route::get('/checkout/success', function (Request $request) {
$sessionId = $request->get('session_id');
- $orderId = Cashier::stripe()->checkout->sessions->retrieve($sessionId)['metadata']['order_id'] ?? null;
+ if ($sessionId === null) {
+ return;
+ }
+
+ $session = Cashier::stripe()->checkout->sessions->retrieve($sessionId);
+
+ if ($session->payment_status !== 'paid') {
+ return;
+ }
+
+ $orderId = $session['metadata']['order_id'] ?? null;
$order = Order::findOrFail($orderId);
diff --git a/original-en/blade.md b/original-en/blade.md
index 0563470..44c5db3 100644
--- a/original-en/blade.md
+++ b/original-en/blade.md
@@ -1168,6 +1168,14 @@ You may invoke a slot's `isEmpty` method to determine if the slot contains conte
```
+Additionally, the `hasActualContent` method may be used to determine if the slot contains any "actual" content that is not an HTML comment:
+
+```blade
+@if ($slot->hasActualContent())
+ The scope has non-comment content.
+@endif
+```
+
#### Scoped Slots
diff --git a/original-en/cashier-paddle.md b/original-en/cashier-paddle.md
index a903d93..bfc7253 100644
--- a/original-en/cashier-paddle.md
+++ b/original-en/cashier-paddle.md
@@ -133,7 +133,7 @@ If you have billable entities that are not users, you may also add the trait to
Next, you should configure your Paddle keys in your application's `.env` file. You can retrieve your Paddle API keys from the Paddle control panel:
```ini
-PADDLE_SELLER_ID=your-paddle-seller-id
+PADDLE_CLIENT_SIDE_TOKEN=your-paddle-client-side-token
PADDLE_API_KEY=your-paddle-api-key
PADDLE_RETAIN_KEY=your-paddle-retain-key
PADDLE_WEBHOOK_SECRET="your-paddle-webhook-secret"
diff --git a/original-en/collections.md b/original-en/collections.md
index 7ad60a5..bc1a978 100644
--- a/original-en/collections.md
+++ b/original-en/collections.md
@@ -184,6 +184,7 @@ For the majority of the remaining collection documentation, we'll discuss each m
[replaceRecursive](#method-replacerecursive)
[reverse](#method-reverse)
[search](#method-search)
+[select](#method-select)
[shift](#method-shift)
[shuffle](#method-shuffle)
[skip](#method-skip)
@@ -2142,6 +2143,27 @@ Alternatively, you may provide your own closure to search for the first item tha
// 2
+
+#### `select()` {.collection-method}
+
+The `select` method selects the given keys from the collection, similar to an SQL `SELECT` statement:
+
+```php
+$users = collect([
+ ['name' => 'Taylor Otwell', 'role' => 'Developer', 'status' => 'active'],
+ ['name' => 'Victoria Faith', 'role' => 'Researcher', 'status' => 'active'],
+]);
+
+$users->select(['name', 'role']);
+
+/*
+ [
+ ['name' => 'Taylor Otwell', 'role' => 'Developer'],
+ ['name' => 'Victoria Faith', 'role' => 'Researcher'],
+ ],
+*/
+```
+
#### `shift()` {.collection-method}
diff --git a/original-en/eloquent.md b/original-en/eloquent.md
index 955e73e..53e1270 100644
--- a/original-en/eloquent.md
+++ b/original-en/eloquent.md
@@ -1210,7 +1210,22 @@ Writing a global scope is simple. First, use the `make:scope` command to generat
#### Applying Global Scopes
-To assign a global scope to a model, you should override the model's `booted` method and invoke the model's `addGlobalScope` method. The `addGlobalScope` method accepts an instance of your scope as its only argument:
+To assign a global scope to a model, you may simply place the `ScopedBy` attribute on the model:
+
+ [UserObserver::class],
- ];
+ public function boot(): void
+ {
+ User::observe(UserObserver::class);
+ }
> [!NOTE]
> There are additional events an observer can listen to, such as `saving` and `retrieved`. These events are described within the [events](#events) documentation.
diff --git a/original-en/helpers.md b/original-en/helpers.md
index 4ba6db9..3615e1e 100644
--- a/original-en/helpers.md
+++ b/original-en/helpers.md
@@ -69,6 +69,7 @@ Laravel includes a variety of global "helper" PHP functions. Many of these funct
[Arr::sortDesc](#method-array-sort-desc)
[Arr::sortRecursive](#method-array-sort-recursive)
[Arr::sortRecursiveDesc](#method-array-sort-recursive-desc)
+[Arr::take](#method-array-take)
[Arr::toCssClasses](#method-array-to-css-classes)
[Arr::toCssStyles](#method-array-to-css-styles)
[Arr::undot](#method-array-undot)
@@ -842,10 +843,31 @@ If you would like the results sorted in descending order, you may use the `Arr::
$sorted = Arr::sortRecursiveDesc($array);
+
+#### `Arr::take()` {.collection-method}
+
+The `Arr::take` method returns a new array with the specified number of items:
+
+ use Illuminate\Support\Arr;
+
+ $array = [0, 1, 2, 3, 4, 5];
+
+ $chunk = Arr::take($array, 3);
+
+ // [0, 1, 2]
+
+You may also pass a negative integer to take the specified number of items from the end of the array:
+
+ $array = [0, 1, 2, 3, 4, 5];
+
+ $chunk = Arr::take($array, -2);
+
+ // [4, 5]
+
#### `Arr::toCssClasses()` {.collection-method}
-The `Arr::toCssClasses` conditionally compiles a CSS class string. The method 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:
+The `Arr::toCssClasses` method conditionally compiles a CSS class string. The method 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:
use Illuminate\Support\Arr;
@@ -866,6 +888,8 @@ The `Arr::toCssClasses` conditionally compiles a CSS class string. The method ac
The `Arr::toCssStyles` conditionally compiles a CSS style string. The method 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:
```php
+use Illuminate\Support\Arr;
+
$hasColor = true;
$array = ['background-color: blue', 'color: blue' => $hasColor];
@@ -1353,7 +1377,7 @@ The `lang_path` function returns the fully qualified path to your application's
$path = lang_path('en/messages.php');
-> [!NOTE]
+> [!NOTE]
> By default, the Laravel application skeleton does not include the `lang` directory. If you would like to customize Laravel's language files, you may publish them via the `lang:publish` Artisan command.
@@ -1699,7 +1723,7 @@ The `env` function retrieves the value of an [environment variable](/docs/{{vers
$env = env('APP_ENV', 'production');
-> [!WARNING]
+> [!WARNING]
> If you execute the `config:cache` command during your deployment process, you should be sure that you are only calling the `env` function from within your configuration files. Once the configuration has been cached, the `.env` file will not be loaded and all calls to the `env` function will return `null`.
@@ -2087,7 +2111,7 @@ Additional arguments may be passed to the `value` function. If the first argumen
$result = value(function (string $name) {
return $name;
}, 'Taylor');
-
+
// 'Taylor'
diff --git a/original-en/http-client.md b/original-en/http-client.md
index 43dfb9f..c172dc8 100644
--- a/original-en/http-client.md
+++ b/original-en/http-client.md
@@ -231,6 +231,18 @@ If you would like the HTTP client to automatically retry the request if a client
$response = Http::retry(3, 100)->post(/* ... */);
+If you would like to manually calculate the number of milliseconds to sleep between attempts, you may pass a closure as the second argument to the `retry` method:
+
+ use Exception;
+
+ $response = Http::retry(3, function (int $attempt, Exception $exception) {
+ return $attempt * 100;
+ })->post(/* ... */);
+
+For convenience, you may also provide an array as the first argument to the `retry` method. This array will be used to determine how many milliseconds to sleep between subsequent attempts:
+
+ $response = Http::retry([100, 200])->post(/* ... */);
+
If needed, you may pass a third argument to the `retry` method. The third argument should be a callable that determines if the retries should actually be attempted. For example, you may wish to only retry the request if the initial request encounters an `ConnectionException`:
use Exception;
diff --git a/original-en/packages.md b/original-en/packages.md
index 5d6a5ca..1ebc1ea 100644
--- a/original-en/packages.md
+++ b/original-en/packages.md
@@ -174,6 +174,18 @@ Package translation lines are referenced using the `package::file.line` syntax c
echo trans('courier::messages.welcome');
+You can register JSON translation files for your package using the `loadJsonTranslationsFrom` method. This method accepts the path to the directory that contains your package's JSON translation files:
+
+```php
+/**
+ * Bootstrap any package services.
+ */
+public function boot(): void
+{
+ $this->loadJsonTranslationsFrom(__DIR__.'/../lang');
+}
+```
+
#### Publishing Language Files
diff --git a/original-en/sail.md b/original-en/sail.md
index a4adf18..404987d 100644
--- a/original-en/sail.md
+++ b/original-en/sail.md
@@ -96,7 +96,7 @@ By default, Sail commands are invoked using the `vendor/bin/sail` script that is
However, instead of repeatedly typing `vendor/bin/sail` to execute Sail commands, you may wish to configure a shell alias that allows you to execute Sail's commands more easily:
```shell
-alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
+alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
```
To make sure this is always available, you may add this to your shell configuration file in your home directory, such as `~/.zshrc` or `~/.bashrc`, and then restart your shell.
diff --git a/original-en/strings.md b/original-en/strings.md
index 29590de..01855fd 100644
--- a/original-en/strings.md
+++ b/original-en/strings.md
@@ -95,6 +95,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
[Str::swap](#method-str-swap)
[Str::take](#method-take)
[Str::title](#method-title-case)
+[Str::toBase64](#method-str-to-base64)
[Str::toHtmlString](#method-str-to-html-string)
[Str::ucfirst](#method-str-ucfirst)
[Str::ucsplit](#method-str-ucsplit)
@@ -194,6 +195,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
[tap](#method-fluent-str-tap)
[test](#method-fluent-str-test)
[title](#method-fluent-str-title)
+[toBase64](#method-fluent-str-to-base64)
[trim](#method-fluent-str-trim)
[ucfirst](#method-fluent-str-ucfirst)
[ucsplit](#method-fluent-str-ucsplit)
@@ -1145,6 +1147,17 @@ The `Str::title` method converts the given string to `Title Case`:
// A Nice Title Uses The Correct Case
+
+#### `Str::toBase64()` {.collection-method}
+
+The `Str::toBase64` method converts the given string to Base64:
+
+ use Illuminate\Support\Str;
+
+ $base64 = Str::toBase64('Laravel');
+
+ // TGFyYXZlbA==
+
#### `Str::toHtmlString()` {.collection-method}
@@ -2417,6 +2430,17 @@ The `title` method converts the given string to `Title Case`:
// A Nice Title Uses The Correct Case
+
+#### `toBase64()` {.collection-method}
+
+The `toBase64` method converts the given string to Base64:
+
+ use Illuminate\Support\Str;
+
+ $base64 = Str::of('Laravel')->toBase64();
+
+ // TGFyYXZlbA==
+
#### `trim` {.collection-method}
diff --git a/translation-ja/billing.md b/translation-ja/billing.md
index 787ccbf..92a9fb0 100644
--- a/translation-ja/billing.md
+++ b/translation-ja/billing.md
@@ -309,7 +309,17 @@ StripeへのAPI呼び出しで発生した例外は、アプリケーション
Route::get('/checkout/success', function (Request $request) {
$sessionId = $request->get('session_id');
- $orderId = Cashier::stripe()->checkout->sessions->retrieve($sessionId)['metadata']['order_id'] ?? null;
+ if ($sessionId === null) {
+ return;
+ }
+
+ $session = Cashier::stripe()->checkout->sessions->retrieve($sessionId);
+
+ if ($session->payment_status !== 'paid') {
+ return;
+ }
+
+ $orderId = $session['metadata']['order_id'] ?? null;
$order = Order::findOrFail($orderId);
diff --git a/translation-ja/blade.md b/translation-ja/blade.md
index b8aa585..5ef4e9e 100644
--- a/translation-ja/blade.md
+++ b/translation-ja/blade.md
@@ -1126,7 +1126,7 @@ public function __construct(
```blade