You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> The `dispatch` helper function and `dispatch` method on the `Dispatchable` class depends on garbage collection to place the job on the queue. Therefore, when using tinker, you should use `Bus::dispatch` or `Queue::push` to dispatch jobs.
84
+
> The `dispatch` helper function and `dispatch` method on the `Dispatchable` class depend on garbage collection to place the job on the queue. Therefore, when using Tinker, you should use `Bus::dispatch` or `Queue::push` to dispatch jobs.
85
85
86
86
<aname="command-allow-list"></a>
87
87
#### Command Allow List
@@ -167,7 +167,7 @@ class SendEmails extends Command
167
167
<aname="exit-codes"></a>
168
168
#### Exit Codes
169
169
170
-
If nothing is returned from the `handle` method and the command executes successfully, the command will exit with a `0` exit code, indicating success. However, the `handle` method may optionally return an integer to manually specify command's exit code:
170
+
If nothing is returned from the `handle` method and the command executes successfully, the command will exit with a `0` exit code, indicating success. However, the `handle` method may optionally return an integer to manually specify the command's exit code:
171
171
172
172
```php
173
173
$this->error('Something went wrong.');
@@ -186,7 +186,7 @@ $this->fail('Something went wrong.');
186
186
187
187
Closure-based commands provide an alternative to defining console commands as classes. In the same way that route closures are an alternative to controllers, think of command closures as an alternative to command classes.
188
188
189
-
Even though the `routes/console.php` file does not define HTTP routes, it defines consolebased entry points (routes) into your application. Within this file, you may define all of your closure-based console commands using the `Artisan::command` method. The `command` method accepts two arguments: the [command signature](#defining-input-expectations) and a closure which receives the command's arguments and options:
189
+
Even though the `routes/console.php` file does not define HTTP routes, it defines console-based entry points (routes) into your application. Within this file, you may define all of your closure-based console commands using the `Artisan::command` method. The `command` method accepts two arguments: the [command signature](#defining-input-expectations) and a closure which receives the command's arguments and options:
190
190
191
191
```php
192
192
Artisan::command('mail:send {user}', function (string $user) {
@@ -274,7 +274,7 @@ public function isolatableId(): string
274
274
<aname="lock-expiration-time"></a>
275
275
#### Lock Expiration Time
276
276
277
-
By default, isolation locks expire after the command is finished. Or, if the command is interrupted and unable to finish, the lock will expire after one hour. However, you may adjust the lock expiration time by defining a`isolationLockExpiresAt` method on your command:
277
+
By default, isolation locks expire after the command is finished. Or, if the command is interrupted and unable to finish, the lock will expire after one hour. However, you may adjust the lock expiration time by defining an`isolationLockExpiresAt` method on your command:
Copy file name to clipboardExpand all lines: original-en/blade.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,7 +138,7 @@ Since many JavaScript frameworks also use "curly" braces to indicate a given exp
138
138
Hello, @{{ name }}.
139
139
```
140
140
141
-
In this example, the `@` symbol will be removed by Blade; however, `{{ name }}` expression will remain untouched by the Blade engine, allowing it to be rendered by your JavaScript framework.
141
+
In this example, the `@` symbol will be removed by Blade; however, the `{{ name }}` expression will remain untouched by the Blade engine, allowing it to be rendered by your JavaScript framework.
142
142
143
143
The `@` symbol may also be used to escape Blade directives:
144
144
@@ -161,7 +161,7 @@ Sometimes you may pass an array to your view with the intention of rendering it
161
161
</script>
162
162
```
163
163
164
-
However, instead of manually calling `json_encode`, you may use the `Illuminate\Support\Js::from` method directive. The `from` method accepts the same arguments as PHP's `json_encode` function; however, it will ensure that the resulting JSON has been properly escaped for inclusion within HTML quotes. The `from` method will return a string `JSON.parse` JavaScript statement that will convert the given object or array into a valid JavaScript object:
164
+
However, instead of manually calling `json_encode`, you may use the `Illuminate\Support\Js::from` method. The `from` method accepts the same arguments as PHP's `json_encode` function; however, it will ensure that the resulting JSON has been properly escaped for inclusion within HTML quotes. The `from` method will return a string `JSON.parse` JavaScript statement that will convert the given object or array into a valid JavaScript object:
165
165
166
166
```blade
167
167
<script>
@@ -1588,7 +1588,7 @@ Prefix "namespaces" may be provided as the second argument to the `anonymousComp
When a prefix is provided, components within that "namespace" may be rendered by prefixing to the component's namespace to the component name when the component is rendered:
1591
+
When a prefix is provided, components within that "namespace" may be rendered by prefixing the component's namespace to the component name when the component is rendered:
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.
536
+
The `failover` cache driver provides automatic failover functionality when interacting with the cache. If the primary cache store of the `failover` 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
537
538
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
539
@@ -547,7 +547,7 @@ To configure a failover cache store, specify the `failover` driver and provide a
547
547
],
548
548
```
549
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:
550
+
Once you have configured a store that uses the `failover` driver, you will need to set the failover store as your default cache store in your application's `.env` file to make use of the failover functionality:
Copy file name to clipboardExpand all lines: original-en/deployment.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@
11
11
-[Caching Events](#caching-events)
12
12
-[Caching Routes](#optimizing-route-loading)
13
13
-[Caching Views](#optimizing-view-loading)
14
+
-[Reloading Services](#reloading-services)
14
15
-[Debug Mode](#debug-mode)
15
16
-[The Health Route](#the-health-route)
16
17
-[Deploying With Laravel Cloud or Forge](#deploying-with-cloud-or-forge)
@@ -168,6 +169,20 @@ php artisan view:cache
168
169
169
170
This command precompiles all your Blade views so they are not compiled on demand, improving the performance of each request that returns a view.
170
171
172
+
<aname="reloading-services"></a>
173
+
## Reloading Services
174
+
175
+
> [!NOTE]
176
+
> When deploying to [Laravel Cloud](https://cloud.laravel.com), it is not necessary to use the `reload` command, as gracefully reloading of all services is handled automatically.
177
+
178
+
After deploying a new version of your application, any long-running services such as queue workers, Laravel Reverb, or Laravel Octane should be reloaded / restarted to use the new code. Laravel provides a single `reload` Artisan command that will terminate these services:
179
+
180
+
```shell
181
+
php artisan reload
182
+
```
183
+
184
+
If you are not using [Laravel Cloud](https://cloud.laravel.com), you should manually configure a process monitor that can detect when your reloadable processes exit and automatically restart them.
Copy file name to clipboardExpand all lines: original-en/helpers.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3227,7 +3227,7 @@ For a thorough discussion of Carbon and its features, please consult the [offici
3227
3227
<aname="interval-functions"></a>
3228
3228
#### Interval Functions
3229
3229
3230
-
Laravel also offers `seconds`, `minutes`, `hours`, `days`, and `years` functions that return `CarbonInterval` instances, which extend PHP's [DateInterval](https://www.php.net/manual/en/class.dateinterval.php) class. These functions may be used anywhere that Laravel accepts a `DateInterval` instance:
3230
+
Laravel also offers `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `weeks`, `months`, and `years` functions that return `CarbonInterval` instances, which extend PHP's [DateInterval](https://www.php.net/manual/en/class.dateinterval.php) class. These functions may be used anywhere that Laravel accepts a `DateInterval` instance:
Copy file name to clipboardExpand all lines: original-en/horizon.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ When using Horizon, all of your queue worker configuration is stored in a single
37
37
## Installation
38
38
39
39
> [!WARNING]
40
-
> Laravel Horizon requires that you use [Redis](https://redis.io) to power your queue. Therefore, you should ensure that your queue connection is set to `redis` in your application's `config/queue.php` configuration file.
40
+
> Laravel Horizon requires that you use [Redis](https://redis.io) to power your queue. Therefore, you should ensure that your queue connection is set to `redis` in your application's `config/queue.php` configuration file. Horizon is not compatible with Redis Cluster at this time.
41
41
42
42
You may install Horizon into your project using the Composer package manager:
Copy file name to clipboardExpand all lines: original-en/mail.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -231,10 +231,10 @@ To accomplish this, you should define a mailer within your application's `mail`
231
231
],
232
232
```
233
233
234
-
Once your failover mailer has been defined, you should set this mailer as the default mailer used by your application by specifying its name as the value of the `default` configuration key within your application's `mail` configuration file:
234
+
Once you have configured a mailer that uses the `failover` transport, you will need to set the failover mailer as your default mailer in your application's `.env` file to make use of the failover functionality:
0 commit comments