Skip to content

Commit d3e0071

Browse files
committed
Merge branch '9.x' into 10.x
2 parents 78be936 + 1f9a3e3 commit d3e0071

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

eloquent-relationships.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,6 +1889,10 @@ If you would like to `save` your model and all of its associated relationships,
18891889

18901890
$post->push();
18911891

1892+
The `pushQuietly` method may be used to save a model and its associated relationships without raising any events:
1893+
1894+
$post->pushQuietly();
1895+
18921896
<a name="the-create-method"></a>
18931897
### The `create` Method
18941898

notifications.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ Sending SMS notifications in Laravel is powered by [Vonage](https://www.vonage.c
947947

948948
The package includes a [configuration file](https://github.com/laravel/vonage-notification-channel/blob/3.x/config/vonage.php). However, you are not required to export this configuration file to your own application. You can simply use the `VONAGE_KEY` and `VONAGE_SECRET` environment variables to define your Vonage public and secret keys.
949949

950-
After defining your keys, you may set a `VONAGE_SMS_FROM` environment variable that defines the phone number that your SMS messages should be sent from by default. You may generate this phone number within the Vonage control panel:
950+
After defining your keys, you should set a `VONAGE_SMS_FROM` environment variable that defines the phone number that your SMS messages should be sent from by default. You may generate this phone number within the Vonage control panel:
951951

952952
VONAGE_SMS_FROM=15556666666
953953

passport.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,9 @@ When tokens have been revoked or expired, you might want to purge them from the
541541
# Purge revoked and expired tokens and auth codes...
542542
php artisan passport:purge
543543

544+
# Only purge tokens expired for more than 6 hours...
545+
php artisan passport:purge --hours=6
546+
544547
# Only purge revoked tokens and auth codes...
545548
php artisan passport:purge --revoked
546549

routing.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,23 @@ Using the `Route::fallback` method, you may define a route that will be executed
665665
<a name="defining-rate-limiters"></a>
666666
### Defining Rate Limiters
667667

668-
Laravel includes powerful and customizable rate limiting services that you may utilize to restrict the amount of traffic for a given route or group of routes. To get started, you should define rate limiter configurations that meet your application's needs. Typically, this should be done within the `configureRateLimiting` method of your application's `App\Providers\RouteServiceProvider` class.
668+
Laravel includes powerful and customizable rate limiting services that you may utilize to restrict the amount of traffic for a given route or group of routes. To get started, you should define rate limiter configurations that meet your application's needs. Typically, this should be done within the `configureRateLimiting` method of your application's `App\Providers\RouteServiceProvider` class, which already includes a rate limiter definition that is applied to the routes in your application's `routes/api.php` file:
669+
670+
```php
671+
use Illuminate\Cache\RateLimiting\Limit;
672+
use Illuminate\Http\Request;
673+
use Illuminate\Support\Facades\RateLimiter;
674+
675+
/**
676+
* Configure the rate limiters for the application.
677+
*/
678+
protected function configureRateLimiting(): void
679+
{
680+
RateLimiter::for('api', function (Request $request) {
681+
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
682+
});
683+
}
684+
```
669685

670686
Rate limiters are defined using the `RateLimiter` facade's `for` method. The `for` method accepts a rate limiter name and a closure that returns the limit configuration that should apply to routes that are assigned to the rate limiter. Limit configuration are instances of the `Illuminate\Cache\RateLimiting\Limit` class. This class contains helpful "builder" methods so that you can quickly define your limit. The rate limiter name may be any string you wish:
671687

0 commit comments

Comments
 (0)