Skip to content

Commit e5ad0d4

Browse files
committed
2025-10-27までの原文変更点反映。
1 parent 6b8ddeb commit e5ad0d4

29 files changed

+218
-114
lines changed

original-en/billing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@
5252
- [Charge With Invoice](#charge-with-invoice)
5353
- [Creating Payment Intents](#creating-payment-intents)
5454
- [Refunding Charges](#refunding-charges)
55+
- [Invoices](#invoices)
56+
- [Retrieving Invoices](#retrieving-invoices)
57+
- [Upcoming Invoices](#upcoming-invoices)
58+
- [Previewing Subscription Invoices](#previewing-subscription-invoices)
59+
- [Generating Invoice PDFs](#generating-invoice-pdfs)
5560
- [Checkout](#checkout)
5661
- [Product Checkouts](#product-checkouts)
5762
- [Single Charge Checkouts](#single-charge-checkouts)
5863
- [Subscription Checkouts](#subscription-checkouts)
5964
- [Collecting Tax IDs](#collecting-tax-ids)
6065
- [Guest Checkouts](#guest-checkouts)
61-
- [Invoices](#invoices)
62-
- [Retrieving Invoices](#retrieving-invoices)
63-
- [Upcoming Invoices](#upcoming-invoices)
64-
- [Previewing Subscription Invoices](#previewing-subscription-invoices)
65-
- [Generating Invoice PDFs](#generating-invoice-pdfs)
6666
- [Handling Failed Payments](#handling-failed-payments)
6767
- [Confirming Payments](#confirming-payments)
6868
- [Strong Customer Authentication (SCA)](#strong-customer-authentication)

original-en/cache.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [Atomic Locks](#atomic-locks)
1515
- [Managing Locks](#managing-locks)
1616
- [Managing Locks Across Processes](#managing-locks-across-processes)
17+
- [Cache Failover](#cache-failover)
1718
- [Adding Custom Cache Drivers](#adding-custom-cache-drivers)
1819
- [Writing the Driver](#writing-the-driver)
1920
- [Registering the Driver](#registering-the-driver)
@@ -529,6 +530,31 @@ If you would like to release a lock without respecting its current owner, you ma
529530
Cache::lock('processing')->forceRelease();
530531
```
531532

533+
<a name="cache-failover"></a>
534+
## Cache Failover
535+
536+
The `failover` cache driver provides automatic failover functionality when interacting with the cache. If the primary cache store fails for any reason, Laravel will automatically attempt to use the next configured store in the list. This is particularly useful for ensuring high availability in production environments where cache reliability is critical.
537+
538+
To configure a failover cache store, specify the `failover` driver and provide an array of store names to attempt in order. By default, Laravel includes an example failover configuration in your application's `config/cache.php` configuration file:
539+
540+
```php
541+
'failover' => [
542+
'driver' => 'failover',
543+
'stores' => [
544+
'database',
545+
'array',
546+
],
547+
],
548+
```
549+
550+
Once you have configured a store that uses the `failover` driver, you will probably want to set the failover store as your default cache store in your application's `.env` file:
551+
552+
```ini
553+
CACHE_STORE=failover
554+
```
555+
556+
When a cache store operation fails and failover is activated, Laravel will dispatch the `Illuminate\Cache\Events\CacheFailedOver` event, allowing you to report or log that a cache store has failed.
557+
532558
<a name="adding-custom-cache-drivers"></a>
533559
## Adding Custom Cache Drivers
534560

original-en/contributions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ When the `@param` or `@return` attributes are redundant due to the use of native
132132
*/
133133
public function handle(AudioProcessor $processor): void
134134
{
135-
//
135+
// ...
136136
}
137137
```
138138

original-en/eloquent-factories.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,20 @@ The new factory class will be placed in your `database/factories` directory.
9595

9696
Once you have defined your factories, you may use the static `factory` method provided to your models by the `Illuminate\Database\Eloquent\Factories\HasFactory` trait in order to instantiate a factory instance for that model.
9797

98-
The `HasFactory` trait's `factory` method will use conventions to determine the proper factory for the model the trait is assigned to. Specifically, the method will look for a factory in the `Database\Factories` namespace that has a class name matching the model name and is suffixed with `Factory`. If these conventions do not apply to your particular application or factory, you may overwrite the `newFactory` method on your model to return an instance of the model's corresponding factory directly:
98+
The `HasFactory` trait's `factory` method will use conventions to determine the proper factory for the model the trait is assigned to. Specifically, the method will look for a factory in the `Database\Factories` namespace that has a class name matching the model name and is suffixed with `Factory`. If these conventions do not apply to your particular application or factory, you may add the `UseFactory` attribute to the model to manually specify the model's factory:
99+
100+
```php
101+
use Illuminate\Database\Eloquent\Attributes\UseFactory;
102+
use Database\Factories\Administration\FlightFactory;
103+
104+
#[UseFactory(FlightFactory::class)]
105+
class Flight extends Model
106+
{
107+
// ...
108+
}
109+
```
110+
111+
Alternatively, you may overwrite the `newFactory` method on your model to return an instance of the model's corresponding factory directly:
99112

100113
```php
101114
use Database\Factories\Administration\FlightFactory;

original-en/eloquent-relationships.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,17 +2127,16 @@ Sometimes you may wish to eager load a relationship but also specify additional
21272127

21282128
```php
21292129
use App\Models\User;
2130-
use Illuminate\Database\Eloquent\Builder;
21312130

2132-
$users = User::with(['posts' => function (Builder $query) {
2131+
$users = User::with(['posts' => function ($query) {
21332132
$query->where('title', 'like', '%code%');
21342133
}])->get();
21352134
```
21362135

21372136
In this example, Eloquent will only eager load posts where the post's `title` column contains the word `code`. You may call other [query builder](/docs/{{version}}/queries) methods to further customize the eager loading operation:
21382137

21392138
```php
2140-
$users = User::with(['posts' => function (Builder $query) {
2139+
$users = User::with(['posts' => function ($query) {
21412140
$query->orderBy('created_at', 'desc');
21422141
}])->get();
21432142
```
@@ -2195,7 +2194,7 @@ if ($condition) {
21952194
If you need to set additional query constraints on the eager loading query, you may pass an array keyed by the relationships you wish to load. The array values should be closure instances which receive the query instance:
21962195

21972196
```php
2198-
$author->load(['books' => function (Builder $query) {
2197+
$author->load(['books' => function ($query) {
21992198
$query->orderBy('published_date', 'asc');
22002199
}]);
22012200
```

original-en/eloquent.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,18 @@ $flight = Flight::updateOrCreate(
794794
);
795795
```
796796

797+
When using methods such as `firstOrCreate` or `updateOrCreate`, you may not know whether a new model has been created or an existing one has been updated. The `wasRecentlyCreated` property indicates if the model was created during its current lifecycle:
798+
799+
```php
800+
$flight = Flight::updateOrCreate(
801+
// ...
802+
);
803+
804+
if ($flight->wasRecentlyCreated) {
805+
// New flight record was inserted...
806+
}
807+
```
808+
797809
<a name="mass-updates"></a>
798810
#### Mass Updates
799811

original-en/fortify.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ As mentioned previously, Laravel Fortify is a frontend agnostic authentication b
4141

4242
**You are not required to use Fortify in order to use Laravel's authentication features.** You are always free to manually interact with Laravel's authentication services by following the documentation available in the [authentication](/docs/{{version}}/authentication), [password reset](/docs/{{version}}/passwords), and [email verification](/docs/{{version}}/verification) documentation.
4343

44-
If you are new to Laravel, you may wish to explore [our application starter kits](/docs/{{version}}/starter-kits) before attempting to use Laravel Fortify. Our starter kits provide an authentication scaffolding for your application that includes a user interface built with [Tailwind CSS](https://tailwindcss.com). This allows you to study and get comfortable with Laravel's authentication features before allowing Laravel Fortify to implement these features for you.
44+
If you are new to Laravel, you may wish to explore [our application starter kits](/docs/{{version}}/starter-kits). Laravel's application starter kits use Fortify internally to provide authentication scaffolding for your application that includes a user interface built with [Tailwind CSS](https://tailwindcss.com). This allows you to study and get comfortable with Laravel's authentication features.
4545

4646
Laravel Fortify essentially takes the routes and controllers of our application starter kits and offers them as a package that does not include a user interface. This allows you to still quickly scaffold the backend implementation of your application's authentication layer without being tied to any particular frontend opinions.
4747

4848
<a name="when-should-i-use-fortify"></a>
4949
### When Should I Use Fortify?
5050

51-
You may be wondering when it is appropriate to use Laravel Fortify. First, if you are using one of Laravel's [application starter kits](/docs/{{version}}/starter-kits), you do not need to install Laravel Fortify since all of Laravel's application starter kits already provide a full authentication implementation.
51+
You may be wondering when it is appropriate to use Laravel Fortify. First, if you are using one of Laravel's [application starter kits](/docs/{{version}}/starter-kits), you do not need to install Laravel Fortify since all of Laravel's application starter kits use Fortify and already provide a full authentication implementation.
5252

5353
If you are not using an application starter kit and your application needs authentication features, you have two options: manually implement your application's authentication features or use Laravel Fortify to provide the backend implementation of these features.
5454

original-en/mcp.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class CurrentWeatherTool extends Tool
354354
}
355355
```
356356

357-
On validation failure, AI clients will act based on the error messages you provide. As such, is critical to provide clear and actionable error messages:
357+
On validation failure, AI clients will act based on the error messages you provide. As such, it is critical to provide clear and actionable error messages:
358358

359359
```php
360360
$validated = $request->validate([
@@ -715,7 +715,7 @@ class DescribeWeatherPrompt extends Prompt
715715
}
716716
```
717717

718-
On validation failure, AI clients will act based on the error messages you provide. As such, is critical to provide clear and actionable error messages:
718+
On validation failure, AI clients will act based on the error messages you provide. As such, it is critical to provide clear and actionable error messages:
719719

720720
```php
721721
$validated = $request->validate([
@@ -1119,16 +1119,16 @@ return Response::error('Unable to fetch weather data for the specified location.
11191119
<a name="authentication"></a>
11201120
## Authentication
11211121

1122-
You can authenticate web MCP servers with middleware just like you would for routes. This will require a user to authenticate before using any capability of the server.
1122+
Just like routes, you can authenticate web MCP servers with middleware. Adding authentication to your MCP server will require a user to authenticate before using any capability of the server.
11231123

1124-
There are two ways to authenticate access to your MCP server: simple, token based authentication via [Laravel Sanctum](/docs/{{version}}/sanctum), or any other arbitrary API tokens which are passed via the `Authorization` HTTP header. Or, you may authenticate via OAuth using [Laravel Passport](/docs/{{version}}/passport).
1124+
There are two ways to authenticate access to your MCP server: simple, token based authentication via [Laravel Sanctum](/docs/{{version}}/sanctum) or any token which is passed via the `Authorization` HTTP header. Or, you may authenticate via OAuth using [Laravel Passport](/docs/{{version}}/passport).
11251125

11261126
<a name="oauth"></a>
11271127
### OAuth 2.1
11281128

1129-
The most robust way to protect your web-based MCP servers is with OAuth through [Laravel Passport](/docs/{{version}}/passport).
1129+
The most robust way to protect your web-based MCP servers is with OAuth using [Laravel Passport](/docs/{{version}}/passport).
11301130

1131-
When authenticating your MCP server via OAuth, you will invoke the `Mcp::oauthRoutes` method in your `routes/ai.php` file to register the required OAuth2 discovery and client registration routes. Then, apply Passport's `auth:api` middleware to your `Mcp::web` route in your `routes/ai.php` file:
1131+
When authenticating your MCP server via OAuth, invoke the `Mcp::oauthRoutes` method in your `routes/ai.php` file to register the required OAuth2 discovery and client registration routes. Then, apply Passport's `auth:api` middleware to your `Mcp::web` route in your `routes/ai.php` file:
11321132

11331133
```php
11341134
use App\Mcp\Servers\WeatherExample;
@@ -1142,7 +1142,7 @@ Mcp::web('/mcp/weather', WeatherExample::class)
11421142

11431143
#### New Passport Installation
11441144

1145-
If your application is not already using Laravel Passport, start by following Passport's [installation and deployment steps](/docs/{{version}}/passport#installation). You should have an `OAuthenticatable` model, new authentication guard, and passport keys before moving on.
1145+
If your application is not already using Laravel Passport, follow Passport's [installation and deployment guide](/docs/{{version}}/passport#installation) to add Passport to your application. You should have an `OAuthenticatable` model, new authentication guard, and passport keys before moving on.
11461146

11471147
Next, you should publish Laravel MCP's provided Passport authorization view:
11481148

@@ -1177,7 +1177,7 @@ This view will be displayed to the end-user during authentication to reject or a
11771177

11781178
If your application is already using Laravel Passport, Laravel MCP should work seamlessly within your existing Passport installation, but custom scopes aren't currently supported as OAuth is primarily used as a translation layer to the underlying authenticatable model.
11791179

1180-
Laravel MCP, via the `Mcp::oauthRoutes()` method discussed above, adds, advertises, and uses a single `mcp:use` scope.
1180+
Laravel MCP, via the `Mcp::oauthRoutes` method discussed above, adds, advertises, and uses a single `mcp:use` scope.
11811181

11821182
#### Passport vs. Sanctum
11831183

original-en/migrations.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ To run all of your outstanding migrations, execute the `migrate` Artisan command
161161
php artisan migrate
162162
```
163163

164-
If you would like to see which migrations have run thus far, you may use the `migrate:status` Artisan command:
164+
If you would like to see which migrations have already run and which are still pending, you may use the `migrate:status` Artisan command:
165165

166166
```shell
167167
php artisan migrate:status
@@ -552,6 +552,7 @@ The schema builder blueprint offers a variety of methods that correspond to the
552552

553553
</div>
554554

555+
<a name="relationship-method-list"></a>
555556
#### Relationship Types
556557

557558
<div class="collection-method-list" markdown="1">

original-en/pagination.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ $users = User::where('votes', '>', 100)->cursorPaginate(15);
108108
<a name="multiple-paginator-instances-per-page"></a>
109109
#### Multiple Paginator Instances per Page
110110

111-
Sometimes you may need to render two separate paginators on a single screen that is rendered by your application. However, if both paginator instances use the `page` query string parameter to store the current page, the two paginator's will conflict. To resolve this conflict, you may pass the name of the query string parameter you wish to use to store the paginator's current page via the third argument provided to the `paginate`, `simplePaginate`, and `cursorPaginate` methods:
111+
Sometimes you may need to render two separate paginators on a single screen that is rendered by your application. However, if both paginator instances use the `page` query string parameter to store the current page, the two paginators will conflict. To resolve this conflict, you may pass the name of the query string parameter you wish to use to store the paginator's current page via the third argument provided to the `paginate`, `simplePaginate`, and `cursorPaginate` methods:
112112

113113
```php
114114
use App\Models\User;

0 commit comments

Comments
 (0)