Skip to content

Commit

Permalink
2023-10-23までの原文変更点反映。
Browse files Browse the repository at this point in the history
  • Loading branch information
HiroKws committed Oct 22, 2023
1 parent f13d3a7 commit bd9c885
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 27 deletions.
4 changes: 2 additions & 2 deletions original-en/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ The `collect` method is primarily useful for converting [lazy collections](#lazy

$collection = $lazyCollection->collect();

get_class($collection);
$collection::class;

// 'Illuminate\Support\Collection'

Expand Down Expand Up @@ -1367,7 +1367,7 @@ The `lazy` method returns a new [`LazyCollection`](#lazy-collections) instance f

$lazyCollection = collect([1, 2, 3, 4])->lazy();

get_class($lazyCollection);
$lazyCollection::class;

// Illuminate\Support\LazyCollection

Expand Down
2 changes: 1 addition & 1 deletion original-en/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ If a class has no dependencies or only depends on other concrete classes (not in
}

Route::get('/', function (Service $service) {
die(get_class($service));
die($service::class);
});

In this example, hitting your application's `/` route will automatically resolve the `Service` class and inject it into your route's handler. This is game changing. It means you can develop your application and take advantage of dependency injection without worrying about bloated configuration files.
Expand Down
2 changes: 1 addition & 1 deletion original-en/dusk.md
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +2058,7 @@ jobs:
DB_PASSWORD: root
MAIL_MAILER: log
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare The Environment
run: cp .env.example .env
- name: Create Database
Expand Down
2 changes: 1 addition & 1 deletion original-en/eloquent-relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,7 @@ You may customize the behavior of lazy loading violations using the `handleLazyL

```php
Model::handleLazyLoadingViolationUsing(function (Model $model, string $relation) {
$class = get_class($model);
$class = $model::class;

info("Attempted to lazy load [{$relation}] on model [{$class}].");
});
Expand Down
8 changes: 4 additions & 4 deletions original-en/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,12 @@ Event subscribers are classes that may subscribe to multiple events from within
/**
* Handle user login events.
*/
public function handleUserLogin(string $event): void {}
public function handleUserLogin(Login $event): void {}

/**
* Handle user logout events.
*/
public function handleUserLogout(string $event): void {}
public function handleUserLogout(Logout $event): void {}

/**
* Register the listeners for the subscriber.
Expand Down Expand Up @@ -592,12 +592,12 @@ If your event listener methods are defined within the subscriber itself, you may
/**
* Handle user login events.
*/
public function handleUserLogin(string $event): void {}
public function handleUserLogin(Login $event): void {}

/**
* Handle user logout events.
*/
public function handleUserLogout(string $event): void {}
public function handleUserLogout(Logout $event): void {}

/**
* Register the listeners for the subscriber.
Expand Down
18 changes: 14 additions & 4 deletions original-en/homestead.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ folders:
> **Warning**
> You should never mount `.` (the current directory) when using Homestead. This causes Vagrant to not map the current folder to `/vagrant` and will break optional features and cause unexpected results while provisioning.

To enable [NFS](https://www.vagrantup.com/docs/synced-folders/nfs.html), you may add a `type` option to your folder mapping:
To enable [NFS](https://developer.hashicorp.com/vagrant/docs/synced-folders/nfs), you may add a `type` option to your folder mapping:

```yaml
folders:
Expand All @@ -229,7 +229,7 @@ folders:
> **Warning**
> When using NFS on Windows, you should consider installing the [vagrant-winnfsd](https://github.com/winnfsd/vagrant-winnfsd) plug-in. This plug-in will maintain the correct user / group permissions for files and directories within the Homestead virtual machine.

You may also pass any options supported by Vagrant's [Synced Folders](https://www.vagrantup.com/docs/synced-folders/basic_usage.html) by listing them under the `options` key:
You may also pass any options supported by Vagrant's [Synced Folders](https://developer.hashicorp.com/vagrant/docs/synced-folders/basic_usage) by listing them under the `options` key:

```yaml
folders:
Expand Down Expand Up @@ -784,7 +784,7 @@ networks:
ip: "192.168.10.20"
```

To enable a [bridged](https://www.vagrantup.com/docs/networking/public_network.html) interface, configure a `bridge` setting for the network and change the network type to `public_network`:
To enable a [bridged](https://developer.hashicorp.com/vagrant/docs/networking/public_network) interface, configure a `bridge` setting for the network and change the network type to `public_network`:

```yaml
networks:
Expand All @@ -793,14 +793,24 @@ networks:
bridge: "en1: Wi-Fi (AirPort)"
```

To enable [DHCP](https://www.vagrantup.com/docs/networking/public_network.html), just remove the `ip` option from your configuration:
To enable [DHCP](https://developer.hashicorp.com/vagrant/docs/networking/public_network#dhcp), just remove the `ip` option from your configuration:

```yaml
networks:
- type: "public_network"
bridge: "en1: Wi-Fi (AirPort)"
```

To update what device the network is using, you may add a `dev` option to the network's configuration. The default `dev` value is `eth0`:

```yaml
networks:
- type: "public_network"
ip: "192.168.10.20"
bridge: "en1: Wi-Fi (AirPort)"
dev: "enp2s0"
```

<a name="extending-homestead"></a>
## Extending Homestead

Expand Down
2 changes: 1 addition & 1 deletion original-en/processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ Route::get('/import', function () {
});
```

When testing this route, we can instruct Laravel to return a fake, successful process result for every invoked process by calling the `fake` method on the `Process` facade with no arguments. In addition, we can even [assert](#available-assertions) that a given process was "ran":
When testing this route, we can instruct Laravel to return a fake, successful process result for every invoked process by calling the `fake` method on the `Process` facade with no arguments. In addition, we can even [assert](#available-assertions) that a given process was "run":

```php
<?php
Expand Down
4 changes: 2 additions & 2 deletions translation-ja/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@

$collection = $lazyCollection->collect();

get_class($collection);
$collection::class;

// 'Illuminate\Support\Collection'

Expand Down Expand Up @@ -1367,7 +1367,7 @@

$lazyCollection = collect([1, 2, 3, 4])->lazy();

get_class($lazyCollection);
$lazyCollection::class;

// Illuminate\Support\LazyCollection

Expand Down
2 changes: 1 addition & 1 deletion translation-ja/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Laravelサービスコンテナを深く理解することは、強力で大規
}

Route::get('/', function (Service $service) {
die(get_class($service));
die($service::class);
});

この例でアプリケーションの`/`ルートを訪問すれば、自動的に`Service`クラスが依存解決され、ルートのハンドラに依存挿入されます。これは大転換です。これは、アプリケーションの開発において、肥大化する設定ファイルの心配をせず依存注入を利用できることを意味します。
Expand Down
2 changes: 1 addition & 1 deletion translation-ja/dusk.md
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +2058,7 @@ jobs:
DB_PASSWORD: root
MAIL_MAILER: log
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare The Environment
run: cp .env.example .env
- name: Create Database
Expand Down
2 changes: 1 addition & 1 deletion translation-ja/eloquent-relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,7 @@ public function boot(): void

```php
Model::handleLazyLoadingViolationUsing(function (Model $model, string $relation) {
$class = get_class($model);
$class = $model::class;

info("Attempted to lazy load [{$relation}] on model [{$class}].");
});
Expand Down
8 changes: 4 additions & 4 deletions translation-ja/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,12 @@ Laravelは、PHPのリフレクションサービスを使用してリスナク
/**
* ユーザーログインイベントの処理
*/
public function handleUserLogin(string $event): void {}
public function handleUserLogin(Login $event): void {}

/**
* ユーザーログアウトイベントの処理
*/
public function handleUserLogout(string $event): void {}
public function handleUserLogout(Logout $event): void {}

/**
* サブスクライバのリスナを登録
Expand Down Expand Up @@ -592,12 +592,12 @@ Laravelは、PHPのリフレクションサービスを使用してリスナク
/**
* ユーザーログインイベントの処理
*/
public function handleUserLogin(string $event): void {}
public function handleUserLogin(Login $event): void {}

/**
* ユーザーログアウトイベントの処理
*/
public function handleUserLogout(string $event): void {}
public function handleUserLogout(Logout $event): void {}

/**
* サブスクライバのリスナを登録
Expand Down
18 changes: 14 additions & 4 deletions translation-ja/homestead.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ folders:
> **Warning**
> Homesteadを使用する場合、`.`(カレントディレクトリ)をマウントしないでください。そうすると、Vagrantはカレントフォルダを`/vagrant`へマップしない状況が起き、オプションの機能が壊れ、プロビジョン中に予期せぬ結果が起きます。

[NFS](https://www.vagrantup.com/v2/synced-folders/nfs.html)を有効にするには、フォルダのマッピングで`type`オプションを付けます。
[NFS](https://developer.hashicorp.com/vagrant/docs/synced-folders/nfs)を有効にするには、フォルダのマッピングで`type`オプションを付けます。

```yaml
folders:
Expand All @@ -229,7 +229,7 @@ folders:
> **Warning**
> Windows上でNFSを使用する場合は、[vagrant-winnfsd](https://github.com/winnfsd/vagrant-winnfsd)プラグインのインストールを考慮すべきでしょう。このプラグインは、Homestead仮想マシン下のファイルとディレクトリのユーザー/グループパーミッションを正しく維持します。

さらに、Vagrantの[同期フォルダ](https://www.vagrantup.com/docs/synced-folders/basic_usage.html)でサポートされている任意のオプションを、`options`キーの下に列挙して渡すことができます。
さらに、Vagrantの[同期フォルダ](https://developer.hashicorp.com/vagrant/docs/synced-folders/basic_usage)でサポートされている任意のオプションを、`options`キーの下に列挙して渡すことができます。

```yaml
folders:
Expand Down Expand Up @@ -784,7 +784,7 @@ networks:
ip: "192.168.10.20"
```

[bridged](https://www.vagrantup.com/docs/networking/public_network.html)インターフェイスを有効にするには、ネットワークの`bridge`設定を構成し、ネットワークタイプを`public_network`へ変更します。
[bridged](https://developer.hashicorp.com/vagrant/docs/networking/public_network)インターフェイスを有効にするには、ネットワークの`bridge`設定を構成し、ネットワークタイプを`public_network`へ変更します。

```yaml
networks:
Expand All @@ -793,14 +793,24 @@ networks:
bridge: "en1: Wi-Fi (AirPort)"
```

[DHCP](https://www.vagrantup.com/docs/networking/public_network.html)を有効にするには、設定から`ip`オプションを削除するだけです。
[DHCP](https://developer.hashicorp.com/vagrant/docs/networking/public_network#dhcp)を有効にするには、設定から`ip`オプションを削除するだけです。

```yaml
networks:
- type: "public_network"
bridge: "en1: Wi-Fi (AirPort)"
```

ネットワークで使用するデバイスを更新するには、ネットワークの設定へ`dev`オプションを追加します。デフォルトの`dev`値は`eth0`です。

```yaml
networks:
- type: "public_network"
ip: "192.168.10.20"
bridge: "en1: Wi-Fi (AirPort)"
dev: "enp2s0"
```

<a name="extending-homestead"></a>
## Homesteadの拡張

Expand Down

0 comments on commit bd9c885

Please sign in to comment.