Skip to content

Commit be5a246

Browse files
committed
2025-03-03までの原文変更点を反映し、12の翻訳完了。
1 parent 19685c9 commit be5a246

33 files changed

+350
-408
lines changed

original-en/artisan.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,7 @@ $this->newLine(3);
692692
<a name="tables"></a>
693693
#### Tables
694694

695-
The `table` method makes it easy to correctly format multiple rows / columns of data. All you need to do is provide the column names and the data for the table and Laravel will
696-
automatically calculate the appropriate width and height of the table for you:
695+
The `table` method makes it easy to correctly format multiple rows / columns of data. All you need to do is provide the column names and the data for the table and Laravel will automatically calculate the appropriate width and height of the table for you:
697696

698697
```php
699698
use App\Models\User;

original-en/configuration.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,11 @@ When accessing this hidden route, you will then be redirected to the `/` route o
322322

323323
By default, Laravel determines if your application is in maintenance mode using a file-based system. This means to activate maintenance mode, the `php artisan down` command has to be executed on each server hosting your application.
324324

325-
Alternatively, Laravel offers a cache-based method for handling maintenance mode. This method requires running the `php artisan down` command on just one server. To use this approach, modify the "driver" setting in the `config/app.php` file of your application to `cache`. Then, select a cache `store` that is accessible by all your servers. This ensures the maintenance mode status is consistently maintained across every server:
325+
Alternatively, Laravel offers a cache-based method for handling maintenance mode. This method requires running the `php artisan down` command on just one server. To use this approach, modify the maintenance mode variables in your application's `.env` file. You should select a cache `store` that is accessible by all of your servers. This ensures the maintenance mode status is consistently maintained across every server:
326326

327-
```php
328-
'maintenance' => [
329-
'driver' => 'cache',
330-
'store' => 'database',
331-
],
327+
```ini
328+
APP_MAINTENANCE_DRIVER=cache
329+
APP_MAINTENANCE_STORE=database
332330
```
333331

334332
<a name="pre-rendering-the-maintenance-mode-view"></a>

original-en/container.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ You can create your own contextual attributes by implementing the `Illuminate\Co
349349

350350
namespace App\Attributes;
351351

352+
use Attribute;
353+
use Illuminate\Contracts\Container\Container;
352354
use Illuminate\Contracts\Container\ContextualAttribute;
353355

354356
#[Attribute(Attribute::TARGET_PARAMETER)]

original-en/contributions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ Informal discussion regarding bugs, new features, and implementation of existing
8282
<a name="which-branch"></a>
8383
## Which Branch?
8484

85-
**All** bug fixes should be sent to the latest version that supports bug fixes (currently `11.x`). Bug fixes should **never** be sent to the `master` branch unless they fix features that exist only in the upcoming release.
85+
**All** bug fixes should be sent to the latest version that supports bug fixes (currently `12.x`). Bug fixes should **never** be sent to the `master` branch unless they fix features that exist only in the upcoming release.
8686

87-
**Minor** features that are **fully backward compatible** with the current release may be sent to the latest stable branch (currently `11.x`).
87+
**Minor** features that are **fully backward compatible** with the current release may be sent to the latest stable branch (currently `12.x`).
8888

8989
**Major** new features or features with breaking changes should always be sent to the `master` branch, which contains the upcoming release.
9090

original-en/errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ During local development, you should set the `APP_DEBUG` environment variable to
3232
<a name="reporting-exceptions"></a>
3333
### Reporting Exceptions
3434

35-
In Laravel, exception reporting is used to log exceptions or send them to an external service [Sentry](https://github.com/getsentry/sentry-laravel) or [Flare](https://flareapp.io). By default, exceptions will be logged based on your [logging](/docs/{{version}}/logging) configuration. However, you are free to log exceptions however you wish.
35+
In Laravel, exception reporting is used to log exceptions or send them to an external service like [Sentry](https://github.com/getsentry/sentry-laravel) or [Flare](https://flareapp.io). By default, exceptions will be logged based on your [logging](/docs/{{version}}/logging) configuration. However, you are free to log exceptions however you wish.
3636

3737
If you need to report different types of exceptions in different ways, you may use the `report` exception method in your application's `bootstrap/app.php` to register a closure that should be executed when an exception of a given type needs to be reported. Laravel will determine what type of exception the closure reports by examining the type-hint of the closure:
3838

original-en/helpers.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ Laravel includes a variety of global "helper" PHP functions. Many of these funct
6666
[Arr::pull](#method-array-pull)
6767
[Arr::query](#method-array-query)
6868
[Arr::random](#method-array-random)
69+
[Arr::reject](#method-array-reject)
70+
[Arr::select](#method-array-select)
6971
[Arr::set](#method-array-set)
7072
[Arr::shuffle](#method-array-shuffle)
7173
[Arr::sort](#method-array-sort)
@@ -828,6 +830,42 @@ $items = Arr::random($array, 2);
828830
// [2, 5] - (retrieved randomly)
829831
```
830832

833+
<a name="method-array-reject"></a>
834+
#### `Arr::reject()` {.collection-method}
835+
836+
The `Arr::reject` method removes items from an array using the given closure:
837+
838+
```php
839+
use Illuminate\Support\Arr;
840+
841+
$array = [100, '200', 300, '400', 500];
842+
843+
$filtered = Arr::reject($array, function (string|int $value, int $key) {
844+
return is_string($value);
845+
});
846+
847+
// [0 => 100, 2 => 300, 4 => 500]
848+
```
849+
850+
<a name="method-array-select"></a>
851+
#### `Arr::select()` {.collection-method}
852+
853+
The `Arr::select` method selects an array of values from an array:
854+
855+
```php
856+
use Illuminate\Support\Arr;
857+
858+
$array = [
859+
['id' => 1, 'name' => 'Desk', 'price' => 200],
860+
['id' => 2, 'name' => 'Table', 'price' => 150],
861+
['id' => 3, 'name' => 'Chair', 'price' => 300],
862+
];
863+
864+
Arr::select($array, ['name', 'price']);
865+
866+
// [['name' => 'Desk', 'price' => 200], ['name' => 'Table', 'price' => 150], ['name' => 'Chair', 'price' => 300]]
867+
```
868+
831869
<a name="method-array-set"></a>
832870
#### `Arr::set()` {.collection-method}
833871

original-en/http-tests.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,7 @@ Laravel's `Illuminate\Testing\TestResponse` class provides a variety of custom a
989989
[assertMovedPermanently](#assert-moved-permanently)
990990
[assertContent](#assert-content)
991991
[assertNoContent](#assert-no-content)
992+
[assertStreamed](#assert-streamed)
992993
[assertStreamedContent](#assert-streamed-content)
993994
[assertNotFound](#assert-not-found)
994995
[assertOk](#assert-ok)
@@ -1004,7 +1005,7 @@ Laravel's `Illuminate\Testing\TestResponse` class provides a variety of custom a
10041005
[assertSeeText](#assert-see-text)
10051006
[assertSeeTextInOrder](#assert-see-text-in-order)
10061007
[assertServerError](#assert-server-error)
1007-
[assertServiceUnavailable](#assert-server-unavailable)
1008+
[assertServiceUnavailable](#assert-service-unavailable)
10081009
[assertSessionHas](#assert-session-has)
10091010
[assertSessionHasInput](#assert-session-has-input)
10101011
[assertSessionHasAll](#assert-session-has-all)
@@ -1472,6 +1473,13 @@ Assert that the response has the given HTTP status code and no content:
14721473
$response->assertNoContent($status = 204);
14731474
```
14741475

1476+
<a name="assert-streamed"></a>
1477+
#### assertStreamed
1478+
1479+
Assert that the response was a streamed response:
1480+
1481+
$response->assertStreamed();
1482+
14751483
<a name="assert-streamed-content"></a>
14761484
#### assertStreamedContent
14771485

@@ -1607,7 +1615,7 @@ Assert that the response has a server error (>= 500 , < 600) HTTP status code:
16071615
$response->assertServerError();
16081616
```
16091617

1610-
<a name="assert-server-unavailable"></a>
1618+
<a name="assert-service-unavailable"></a>
16111619
#### assertServiceUnavailable
16121620

16131621
Assert that the response has a "Service Unavailable" (503) HTTP status code:
@@ -1822,6 +1830,12 @@ $response->assertInvalid([
18221830
]);
18231831
```
18241832

1833+
If you would like to assert that the given fields are the only fields with validation errors, you may use the `assertOnlyInvalid` method:
1834+
1835+
```php
1836+
$response->assertOnlyInvalid(['name', 'email']);
1837+
```
1838+
18251839
<a name="assert-view-has"></a>
18261840
#### assertViewHas
18271841

original-en/installation.md

Lines changed: 5 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@
99
- [Environment Based Configuration](#environment-based-configuration)
1010
- [Databases and Migrations](#databases-and-migrations)
1111
- [Directory Configuration](#directory-configuration)
12-
- [Local Installation Using Herd](#local-installation-using-herd)
12+
- [Installation Using Herd](#installation-using-herd)
1313
- [Herd on macOS](#herd-on-macos)
1414
- [Herd on Windows](#herd-on-windows)
15-
- [Docker Installation Using Sail](#docker-installation-using-sail)
16-
- [Sail on macOS](#sail-on-macos)
17-
- [Sail on Windows](#sail-on-windows)
18-
- [Sail on Linux](#sail-on-linux)
19-
- [Choosing Your Sail Services](#choosing-your-sail-services)
2015
- [IDE Support](#ide-support)
2116
- [Next Steps](#next-steps)
2217
- [Laravel the Full Stack Framework](#laravel-the-fullstack-framework)
@@ -84,7 +79,7 @@ composer global require laravel/installer
8479
```
8580

8681
> [!NOTE]
87-
> For a fully-featured, graphical PHP installation and management experience, check out [Laravel Herd](#local-installation-using-herd).
82+
> For a fully-featured, graphical PHP installation and management experience, check out [Laravel Herd](#installation-using-herd).
8883
8984
<a name="creating-an-application"></a>
9085
### Creating an Application
@@ -150,15 +145,15 @@ php artisan migrate
150145
```
151146

152147
> [!NOTE]
153-
> If you are developing on macOS or Windows and need to install MySQL, PostgreSQL, or Redis locally, consider using [Herd Pro](https://herd.laravel.com/#plans).
148+
> If you are developing on macOS or Windows and need to install MySQL, PostgreSQL, or Redis locally, consider using [Herd Pro](https://herd.laravel.com/#plans) or [DBngin](https://dbngin.com/).
154149
155150
<a name="directory-configuration"></a>
156151
### Directory Configuration
157152

158153
Laravel should always be served out of the root of the "web directory" configured for your web server. You should not attempt to serve a Laravel application out of a subdirectory of the "web directory". Attempting to do so could expose sensitive files present within your application.
159154

160-
<a name="local-installation-using-herd"></a>
161-
## Local Installation Using Herd
155+
<a name="installation-using-herd"></a>
156+
## Installation Using Herd
162157

163158
[Laravel Herd](https://herd.laravel.com) is a blazing fast, native Laravel and PHP development environment for macOS and Windows. Herd includes everything you need to get started with Laravel development, including PHP and Nginx.
164159

@@ -207,150 +202,6 @@ herd open
207202

208203
You can learn more about Herd by checking out the [Herd documentation for Windows](https://herd.laravel.com/docs/windows).
209204

210-
<a name="docker-installation-using-sail"></a>
211-
## Docker Installation Using Sail
212-
213-
We want it to be as easy as possible to get started with Laravel regardless of your preferred operating system. So, there are a variety of options for developing and running a Laravel application on your local machine. While you may wish to explore these options at a later time, Laravel provides [Sail](/docs/{{version}}/sail), a built-in solution for running your Laravel application using [Docker](https://www.docker.com).
214-
215-
Docker is a tool for running applications and services in small, light-weight "containers" which do not interfere with your local machine's installed software or configuration. This means you don't have to worry about configuring or setting up complicated development tools such as web servers and databases on your local machine. To get started, you only need to install [Docker Desktop](https://www.docker.com/products/docker-desktop).
216-
217-
Laravel Sail is a light-weight command-line interface for interacting with Laravel's default Docker configuration. Sail provides a great starting point for building a Laravel application using PHP, MySQL, and Redis without requiring prior Docker experience.
218-
219-
> [!NOTE]
220-
> Already a Docker expert? Don't worry! Everything about Sail can be customized using the `docker-compose.yml` file included with Laravel.
221-
222-
<a name="sail-on-macos"></a>
223-
### Sail on macOS
224-
225-
If you're developing on a Mac and [Docker Desktop](https://www.docker.com/products/docker-desktop) is already installed, you can use a simple terminal command to create a new Laravel application. For example, to create a new Laravel application in a directory named "example-app", you may run the following command in your terminal:
226-
227-
```shell
228-
curl -s "https://laravel.build/example-app" | bash
229-
```
230-
231-
Of course, you can change "example-app" in this URL to anything you like - just make sure the application name only contains alpha-numeric characters, dashes, and underscores. The Laravel application's directory will be created within the directory you execute the command from.
232-
233-
Sail installation may take several minutes while Sail's application containers are built on your local machine.
234-
235-
After the application has been created, you can navigate to the application directory and start Laravel Sail. Laravel Sail provides a simple command-line interface for interacting with Laravel's default Docker configuration:
236-
237-
```shell
238-
cd example-app
239-
240-
./vendor/bin/sail up
241-
```
242-
243-
Once the application's Docker containers have started, you should run your application's [database migrations](/docs/{{version}}/migrations):
244-
245-
```shell
246-
./vendor/bin/sail artisan migrate
247-
```
248-
249-
Finally, you can access the application in your web browser at: http://localhost.
250-
251-
> [!NOTE]
252-
> To continue learning more about Laravel Sail, review its [complete documentation](/docs/{{version}}/sail).
253-
254-
<a name="sail-on-windows"></a>
255-
### Sail on Windows
256-
257-
Before we create a new Laravel application on your Windows machine, make sure to install [Docker Desktop](https://www.docker.com/products/docker-desktop). Next, you should ensure that Windows Subsystem for Linux 2 (WSL2) is installed and enabled. WSL allows you to run Linux binary executables natively on Windows 10. Information on how to install and enable WSL2 can be found within Microsoft's [developer environment documentation](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
258-
259-
> [!NOTE]
260-
> After installing and enabling WSL2, you should ensure that Docker Desktop is [configured to use the WSL2 backend](https://docs.docker.com/docker-for-windows/wsl/).
261-
262-
Next, you are ready to create your first Laravel application. Launch [Windows Terminal](https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?rtc=1&activetab=pivot:overviewtab) and begin a new terminal session for your WSL2 Linux operating system. Next, you can use a simple terminal command to create a new Laravel application. For example, to create a new Laravel application in a directory named "example-app", you may run the following command in your terminal:
263-
264-
```shell
265-
curl -s https://laravel.build/example-app | bash
266-
```
267-
268-
Of course, you can change "example-app" in this URL to anything you like - just make sure the application name only contains alpha-numeric characters, dashes, and underscores. The Laravel application's directory will be created within the directory you execute the command from.
269-
270-
Sail installation may take several minutes while Sail's application containers are built on your local machine.
271-
272-
After the application has been created, you can navigate to the application directory and start Laravel Sail. Laravel Sail provides a simple command-line interface for interacting with Laravel's default Docker configuration:
273-
274-
```shell
275-
cd example-app
276-
277-
./vendor/bin/sail up
278-
```
279-
280-
Once the application's Docker containers have started, you should run your application's [database migrations](/docs/{{version}}/migrations):
281-
282-
```shell
283-
./vendor/bin/sail artisan migrate
284-
```
285-
286-
Finally, you can access the application in your web browser at: http://localhost.
287-
288-
> [!NOTE]
289-
> To continue learning more about Laravel Sail, review its [complete documentation](/docs/{{version}}/sail).
290-
291-
#### Developing Within WSL2
292-
293-
Of course, you will need to be able to modify the Laravel application files that were created within your WSL2 installation. To accomplish this, we recommend using Microsoft's [Visual Studio Code](https://code.visualstudio.com) editor and their first-party extension for [Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack).
294-
295-
Once these tools are installed, you may open any Laravel application by executing the `code .` command from your application's root directory using Windows Terminal.
296-
297-
<a name="sail-on-linux"></a>
298-
### Sail on Linux
299-
300-
If you're developing on Linux and [Docker Compose](https://docs.docker.com/compose/install/) is already installed, you can use a simple terminal command to create a new Laravel application.
301-
302-
First, if you are using Docker Desktop for Linux, you should execute the following command. If you are not using Docker Desktop for Linux, you may skip this step:
303-
304-
```shell
305-
docker context use default
306-
```
307-
308-
Then, to create a new Laravel application in a directory named "example-app", you may run the following command in your terminal:
309-
310-
```shell
311-
curl -s https://laravel.build/example-app | bash
312-
```
313-
314-
Of course, you can change "example-app" in this URL to anything you like - just make sure the application name only contains alpha-numeric characters, dashes, and underscores. The Laravel application's directory will be created within the directory you execute the command from.
315-
316-
Sail installation may take several minutes while Sail's application containers are built on your local machine.
317-
318-
After the application has been created, you can navigate to the application directory and start Laravel Sail. Laravel Sail provides a simple command-line interface for interacting with Laravel's default Docker configuration:
319-
320-
```shell
321-
cd example-app
322-
323-
./vendor/bin/sail up
324-
```
325-
326-
Once the application's Docker containers have started, you should run your application's [database migrations](/docs/{{version}}/migrations):
327-
328-
```shell
329-
./vendor/bin/sail artisan migrate
330-
```
331-
332-
Finally, you can access the application in your web browser at: http://localhost.
333-
334-
> [!NOTE]
335-
> To continue learning more about Laravel Sail, review its [complete documentation](/docs/{{version}}/sail).
336-
337-
<a name="choosing-your-sail-services"></a>
338-
### Choosing Your Sail Services
339-
340-
When creating a new Laravel application via Sail, you may use the `with` query string variable to choose which services should be configured in your new application's `docker-compose.yml` file. Available services include `mysql`, `pgsql`, `mariadb`, `redis`, `valkey`, `memcached`, `meilisearch`, `typesense`, `minio`, `selenium`, and `mailpit`:
341-
342-
```shell
343-
curl -s "https://laravel.build/example-app?with=mysql,redis" | bash
344-
```
345-
346-
If you do not specify which services you would like configured, a default stack of `mysql`, `redis`, `meilisearch`, `mailpit`, and `selenium` will be configured.
347-
348-
You may instruct Sail to install a default [Devcontainer](/docs/{{version}}/sail#using-devcontainers) by adding the `devcontainer` parameter to the URL:
349-
350-
```shell
351-
curl -s "https://laravel.build/example-app?with=mysql,redis&devcontainer" | bash
352-
```
353-
354205
<a name="ide-support"></a>
355206
## IDE Support
356207

0 commit comments

Comments
 (0)