Skip to content

Commit b9c509f

Browse files
committed
2025-10-13までの原文変更点反映。
1 parent d023111 commit b9c509f

19 files changed

+259
-55
lines changed

original-en/cache.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -410,30 +410,38 @@ cache()->remember('users', $seconds, function () {
410410

411411
Cache tags allow you to tag related items in the cache and then flush all cached values that have been assigned a given tag. You may access a tagged cache by passing in an ordered array of tag names. For example, let's access a tagged cache and `put` a value into the cache:
412412

413-
use Illuminate\Support\Facades\Cache;
413+
```php
414+
use Illuminate\Support\Facades\Cache;
414415

415-
Cache::tags(['people', 'artists'])->put('John', $john, $seconds);
416-
Cache::tags(['people', 'authors'])->put('Anne', $anne, $seconds);
416+
Cache::tags(['people', 'artists'])->put('John', $john, $seconds);
417+
Cache::tags(['people', 'authors'])->put('Anne', $anne, $seconds);
418+
```
417419

418420
<a name="accessing-tagged-cache-items"></a>
419421
### Accessing Tagged Cache Items
420422

421423
Items stored via tags may not be accessed without also providing the tags that were used to store the value. To retrieve a tagged cache item, pass the same ordered list of tags to the `tags` method, then call the `get` method with the key you wish to retrieve:
422424

423-
$john = Cache::tags(['people', 'artists'])->get('John');
425+
```php
426+
$john = Cache::tags(['people', 'artists'])->get('John');
424427

425-
$anne = Cache::tags(['people', 'authors'])->get('Anne');
428+
$anne = Cache::tags(['people', 'authors'])->get('Anne');
429+
```
426430

427431
<a name="removing-tagged-cache-items"></a>
428432
### Removing Tagged Cache Items
429433

430434
You may flush all items that are assigned a tag or list of tags. For example, the following code would remove all caches tagged with either `people`, `authors`, or both. So, both `Anne` and `John` would be removed from the cache:
431435

432-
Cache::tags(['people', 'authors'])->flush();
436+
```php
437+
Cache::tags(['people', 'authors'])->flush();
438+
```
433439

434440
In contrast, the code below would remove only cached values tagged with `authors`, so `Anne` would be removed, but not `John`:
435441

436-
Cache::tags('authors')->flush();
442+
```php
443+
Cache::tags('authors')->flush();
444+
```
437445

438446
<a name="atomic-locks"></a>
439447
## Atomic Locks

original-en/eloquent-resources.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,8 @@ If you would like to customize the information included in the `links` or `meta`
557557
* Customize the pagination information for the resource.
558558
*
559559
* @param \Illuminate\Http\Request $request
560-
* @param array $paginated
561-
* @param array $default
560+
* @param array $paginated
561+
* @param array $default
562562
* @return array
563563
*/
564564
public function paginationInformation($request, $paginated, $default)

original-en/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ class SendShipmentNotification implements ShouldQueue
427427
*/
428428
public function handle(OrderShipped $event): void
429429
{
430-
if (true) {
430+
if ($condition) {
431431
$this->release(30);
432432
}
433433
}

original-en/fortify.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
- [Customizing User Authentication](#customizing-user-authentication)
1111
- [Customizing the Authentication Pipeline](#customizing-the-authentication-pipeline)
1212
- [Customizing Redirects](#customizing-authentication-redirects)
13-
- [Two Factor Authentication](#two-factor-authentication)
14-
- [Enabling Two Factor Authentication](#enabling-two-factor-authentication)
15-
- [Authenticating With Two Factor Authentication](#authenticating-with-two-factor-authentication)
16-
- [Disabling Two Factor Authentication](#disabling-two-factor-authentication)
13+
- [Two-Factor Authentication](#two-factor-authentication)
14+
- [Enabling Two-Factor Authentication](#enabling-two-factor-authentication)
15+
- [Authenticating With Two-Factor Authentication](#authenticating-with-two-factor-authentication)
16+
- [Disabling Two-Factor Authentication](#disabling-two-factor-authentication)
1717
- [Registration](#registration)
1818
- [Customizing Registration](#customizing-registration)
1919
- [Password Reset](#password-reset)
@@ -217,7 +217,7 @@ By default, Fortify will throttle authentication attempts using the `EnsureLogin
217217
Some applications may require a different approach to throttling authentication attempts, such as throttling by IP address alone. Therefore, Fortify allows you to specify your own [rate limiter](/docs/{{version}}/routing#rate-limiting) via the `fortify.limiters.login` configuration option. Of course, this configuration option is located in your application's `config/fortify.php` configuration file.
218218

219219
> [!NOTE]
220-
> Utilizing a mixture of throttling, [two factor authentication](/docs/{{version}}/fortify#two-factor-authentication), and an external web application firewall (WAF) will provide the most robust defense for your legitimate application users.
220+
> Utilizing a mixture of throttling, [two-factor authentication](/docs/{{version}}/fortify#two-factor-authentication), and an external web application firewall (WAF) will provide the most robust defense for your legitimate application users.
221221
222222
<a name="customizing-authentication-redirects"></a>
223223
### Customizing Redirects
@@ -244,9 +244,9 @@ public function register(): void
244244
```
245245

246246
<a name="two-factor-authentication"></a>
247-
## Two Factor Authentication
247+
## Two-Factor Authentication
248248

249-
When Fortify's two factor authentication feature is enabled, the user is required to input a six digit numeric token during the authentication process. This token is generated using a time-based one-time password (TOTP) that can be retrieved from any TOTP compatible mobile authentication application such as Google Authenticator.
249+
When Fortify's two-factor authentication feature is enabled, the user is required to input a six digit numeric token during the authentication process. This token is generated using a time-based one-time password (TOTP) that can be retrieved from any TOTP compatible mobile authentication application such as Google Authenticator.
250250

251251
Before getting started, you should first ensure that your application's `App\Models\User` model uses the `Laravel\Fortify\TwoFactorAuthenticatable` trait:
252252

@@ -265,54 +265,54 @@ class User extends Authenticatable
265265
}
266266
```
267267

268-
Next, you should build a screen within your application where users can manage their two factor authentication settings. This screen should allow the user to enable and disable two factor authentication, as well as regenerate their two factor authentication recovery codes.
268+
Next, you should build a screen within your application where users can manage their two-factor authentication settings. This screen should allow the user to enable and disable two-factor authentication, as well as regenerate their two-factor authentication recovery codes.
269269

270-
> By default, the `features` array of the `fortify` configuration file instructs Fortify's two factor authentication settings to require password confirmation before modification. Therefore, your application should implement Fortify's [password confirmation](#password-confirmation) feature before continuing.
270+
> By default, the `features` array of the `fortify` configuration file instructs Fortify's two-factor authentication settings to require password confirmation before modification. Therefore, your application should implement Fortify's [password confirmation](#password-confirmation) feature before continuing.
271271
272272
<a name="enabling-two-factor-authentication"></a>
273-
### Enabling Two Factor Authentication
273+
### Enabling Two-Factor Authentication
274274

275-
To begin enabling two factor authentication, your application should make a POST request to the `/user/two-factor-authentication` endpoint defined by Fortify. If the request is successful, the user will be redirected back to the previous URL and the `status` session variable will be set to `two-factor-authentication-enabled`. You may detect this `status` session variable within your templates to display the appropriate success message. If the request was an XHR request, `200` HTTP response will be returned.
275+
To begin enabling two-factor authentication, your application should make a POST request to the `/user/two-factor-authentication` endpoint defined by Fortify. If the request is successful, the user will be redirected back to the previous URL and the `status` session variable will be set to `two-factor-authentication-enabled`. You may detect this `status` session variable within your templates to display the appropriate success message. If the request was an XHR request, `200` HTTP response will be returned.
276276

277-
After choosing to enable two factor authentication, the user must still "confirm" their two factor authentication configuration by providing a valid two factor authentication code. So, your "success" message should instruct the user that two factor authentication confirmation is still required:
277+
After choosing to enable two-factor authentication, the user must still "confirm" their two-factor authentication configuration by providing a valid two-factor authentication code. So, your "success" message should instruct the user that two-factor authentication confirmation is still required:
278278

279279
```html
280280
@if (session('status') == 'two-factor-authentication-enabled')
281281
<div class="mb-4 font-medium text-sm">
282-
Please finish configuring two factor authentication below.
282+
Please finish configuring two-factor authentication below.
283283
</div>
284284
@endif
285285
```
286286

287-
Next, you should display the two factor authentication QR code for the user to scan into their authenticator application. If you are using Blade to render your application's frontend, you may retrieve the QR code SVG using the `twoFactorQrCodeSvg` method available on the user instance:
287+
Next, you should display the two-factor authentication QR code for the user to scan into their authenticator application. If you are using Blade to render your application's frontend, you may retrieve the QR code SVG using the `twoFactorQrCodeSvg` method available on the user instance:
288288

289289
```php
290290
$request->user()->twoFactorQrCodeSvg();
291291
```
292292

293-
If you are building a JavaScript powered frontend, you may make an XHR GET request to the `/user/two-factor-qr-code` endpoint to retrieve the user's two factor authentication QR code. This endpoint will return a JSON object containing an `svg` key.
293+
If you are building a JavaScript powered frontend, you may make an XHR GET request to the `/user/two-factor-qr-code` endpoint to retrieve the user's two-factor authentication QR code. This endpoint will return a JSON object containing an `svg` key.
294294

295295
<a name="confirming-two-factor-authentication"></a>
296-
#### Confirming Two Factor Authentication
296+
#### Confirming Two-Factor Authentication
297297

298-
In addition to displaying the user's two factor authentication QR code, you should provide a text input where the user can supply a valid authentication code to "confirm" their two factor authentication configuration. This code should be provided to the Laravel application via a POST request to the `/user/confirmed-two-factor-authentication` endpoint defined by Fortify.
298+
In addition to displaying the user's two-factor authentication QR code, you should provide a text input where the user can supply a valid authentication code to "confirm" their two-factor authentication configuration. This code should be provided to the Laravel application via a POST request to the `/user/confirmed-two-factor-authentication` endpoint defined by Fortify.
299299

300300
If the request is successful, the user will be redirected back to the previous URL and the `status` session variable will be set to `two-factor-authentication-confirmed`:
301301

302302
```html
303303
@if (session('status') == 'two-factor-authentication-confirmed')
304304
<div class="mb-4 font-medium text-sm">
305-
Two factor authentication confirmed and enabled successfully.
305+
Two-factor authentication confirmed and enabled successfully.
306306
</div>
307307
@endif
308308
```
309309

310-
If the request to the two factor authentication confirmation endpoint was made via an XHR request, a `200` HTTP response will be returned.
310+
If the request to the two-factor authentication confirmation endpoint was made via an XHR request, a `200` HTTP response will be returned.
311311

312312
<a name="displaying-the-recovery-codes"></a>
313313
#### Displaying the Recovery Codes
314314

315-
You should also display the user's two factor recovery codes. These recovery codes allow the user to authenticate if they lose access to their mobile device. If you are using Blade to render your application's frontend, you may access the recovery codes via the authenticated user instance:
315+
You should also display the user's two-factor recovery codes. These recovery codes allow the user to authenticate if they lose access to their mobile device. If you are using Blade to render your application's frontend, you may access the recovery codes via the authenticated user instance:
316316

317317
```php
318318
(array) $request->user()->recoveryCodes()
@@ -323,11 +323,11 @@ If you are building a JavaScript powered frontend, you may make an XHR GET reque
323323
To regenerate the user's recovery codes, your application should make a POST request to the `/user/two-factor-recovery-codes` endpoint.
324324

325325
<a name="authenticating-with-two-factor-authentication"></a>
326-
### Authenticating With Two Factor Authentication
326+
### Authenticating With Two-Factor Authentication
327327

328-
During the authentication process, Fortify will automatically redirect the user to your application's two factor authentication challenge screen. However, if your application is making an XHR login request, the JSON response returned after a successful authentication attempt will contain a JSON object that has a `two_factor` boolean property. You should inspect this value to know whether you should redirect to your application's two factor authentication challenge screen.
328+
During the authentication process, Fortify will automatically redirect the user to your application's two-factor authentication challenge screen. However, if your application is making an XHR login request, the JSON response returned after a successful authentication attempt will contain a JSON object that has a `two_factor` boolean property. You should inspect this value to know whether you should redirect to your application's two-factor authentication challenge screen.
329329

330-
To begin implementing two factor authentication functionality, we need to instruct Fortify how to return our two factor authentication challenge view. All of Fortify's authentication view rendering logic may be customized using the appropriate methods available via the `Laravel\Fortify\Fortify` class. Typically, you should call this method from the `boot` method of your application's `App\Providers\FortifyServiceProvider` class:
330+
To begin implementing two-factor authentication functionality, we need to instruct Fortify how to return our two-factor authentication challenge view. All of Fortify's authentication view rendering logic may be customized using the appropriate methods available via the `Laravel\Fortify\Fortify` class. Typically, you should call this method from the `boot` method of your application's `App\Providers\FortifyServiceProvider` class:
331331

332332
```php
333333
use Laravel\Fortify\Fortify;
@@ -349,12 +349,12 @@ Fortify will take care of defining the `/two-factor-challenge` route that return
349349

350350
If the login attempt is successful, Fortify will redirect the user to the URI configured via the `home` configuration option within your application's `fortify` configuration file. If the login request was an XHR request, a 204 HTTP response will be returned.
351351

352-
If the request was not successful, the user will be redirected back to the two factor challenge screen and the validation errors will be available to you via the shared `$errors` [Blade template variable](/docs/{{version}}/validation#quick-displaying-the-validation-errors). Or, in the case of an XHR request, the validation errors will be returned with a 422 HTTP response.
352+
If the request was not successful, the user will be redirected back to the two-factor challenge screen and the validation errors will be available to you via the shared `$errors` [Blade template variable](/docs/{{version}}/validation#quick-displaying-the-validation-errors). Or, in the case of an XHR request, the validation errors will be returned with a 422 HTTP response.
353353

354354
<a name="disabling-two-factor-authentication"></a>
355-
### Disabling Two Factor Authentication
355+
### Disabling Two-Factor Authentication
356356

357-
To disable two factor authentication, your application should make a DELETE request to the `/user/two-factor-authentication` endpoint. Remember, Fortify's two factor authentication endpoints require [password confirmation](#password-confirmation) prior to being called.
357+
To disable two-factor authentication, your application should make a DELETE request to the `/user/two-factor-authentication` endpoint. Remember, Fortify's two-factor authentication endpoints require [password confirmation](#password-confirmation) prior to being called.
358358

359359
<a name="registration"></a>
360360
## Registration

original-en/mail.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,8 @@ public function boot(): void
14461446
}
14471447
```
14481448

1449+
When using the `alwaysTo` method, any additional "cc" or "bcc" addresses on mail messages will be removed.
1450+
14491451
<a name="events"></a>
14501452
## Events
14511453

original-en/mcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class CurrentWeatherTool extends Tool
312312
->description('The location to get the weather for.')
313313
->required(),
314314

315-
'units' => $schema->array()
315+
'units' => $schema->string()
316316
->enum(['celsius', 'fahrenheit'])
317317
->description('The temperature units to use.')
318318
->default('celsius'),

original-en/notifications.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,94 @@ public function viaQueues(): array
275275
}
276276
```
277277

278+
<a name="customizing-queued-notification-job-properties"></a>
279+
#### Customizing Queued Notification Job Properties
280+
281+
You may customize the behavior of the underlying queued job by defining properties on your notification class. These properties will be inherited by the queued job that sends the notification:
282+
283+
```php
284+
<?php
285+
286+
namespace App\Notifications;
287+
288+
use Illuminate\Bus\Queueable;
289+
use Illuminate\Contracts\Queue\ShouldQueue;
290+
use Illuminate\Notifications\Notification;
291+
292+
class InvoicePaid extends Notification implements ShouldQueue
293+
{
294+
use Queueable;
295+
296+
/**
297+
* The number of times the notification may be attempted.
298+
*
299+
* @var int
300+
*/
301+
public $tries = 5;
302+
303+
/**
304+
* The number of seconds the notification can run before timing out.
305+
*
306+
* @var int
307+
*/
308+
public $timeout = 120;
309+
310+
/**
311+
* The maximum number of unhandled exceptions to allow before failing.
312+
*
313+
* @var int
314+
*/
315+
public $maxExceptions = 3;
316+
317+
// ...
318+
}
319+
```
320+
321+
If you would like to ensure the privacy and integrity of a queued notification's data via [encryption](/docs/{{version}}/encryption), add the `ShouldBeEncrypted` interface to your notification class:
322+
323+
```php
324+
<?php
325+
326+
namespace App\Notifications;
327+
328+
use Illuminate\Bus\Queueable;
329+
use Illuminate\Contracts\Queue\ShouldBeEncrypted;
330+
use Illuminate\Contracts\Queue\ShouldQueue;
331+
use Illuminate\Notifications\Notification;
332+
333+
class InvoicePaid extends Notification implements ShouldQueue, ShouldBeEncrypted
334+
{
335+
use Queueable;
336+
337+
// ...
338+
}
339+
```
340+
341+
In addition to defining these properties directly on your notification class, you may also define `backoff` and `retryUntil` methods to specify the backoff strategy and retry timeout for the queued notification job:
342+
343+
```php
344+
use DateTime;
345+
346+
/**
347+
* Calculate the number of seconds to wait before retrying the notification.
348+
*/
349+
public function backoff(): int
350+
{
351+
return 3;
352+
}
353+
354+
/**
355+
* Determine the time at which the notification should timeout.
356+
*/
357+
public function retryUntil(): DateTime
358+
{
359+
return now()->addMinutes(5);
360+
}
361+
```
362+
363+
> [!NOTE]
364+
> For more information on these job properties and methods, please review the documentation on [queued jobs](/docs/{{version}}/queues#max-job-attempts-and-timeout).
365+
278366
<a name="queued-notification-middleware"></a>
279367
#### Queued Notification Middleware
280368

original-en/precognition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ If you are validating a subset of a form's inputs with Precognition, it can be u
330330
id="avatar"
331331
type="file"
332332
onChange={(e) => {
333-
form.setData('avatar', e.target.value);
333+
form.setData('avatar', e.target.files[0]);
334334

335335
form.forgetError('avatar');
336336
}}

0 commit comments

Comments
 (0)