diff --git a/localization.md b/localization.md
index c001b512327..c5e0313db6b 100644
--- a/localization.md
+++ b/localization.md
@@ -91,9 +91,9 @@ You may instruct Laravel's "pluralizer", which is used by Eloquent and other por
*/
public function boot(): void
{
- Pluralizer::useLanguage('spanish');
+ Pluralizer::useLanguage('spanish');
- // ...
+ // ...
}
> [!WARNING]
@@ -152,7 +152,7 @@ You may retrieve translation strings from your language files using the `__` hel
If the specified translation string does not exist, the `__` function will return the translation string key. So, using the example above, the `__` function would return `messages.welcome` if the translation string does not exist.
- If you are using your [default translation strings as your translation keys](#using-translation-strings-as-keys), you should pass the default translation of your string to the `__` function;
+If you are using your [default translation strings as your translation keys](#using-translation-strings-as-keys), you should pass the default translation of your string to the `__` function;
echo __('I love programming.');
diff --git a/logging.md b/logging.md
index 2ea1ff8e682..251a52d663b 100644
--- a/logging.md
+++ b/logging.md
@@ -41,17 +41,17 @@ Each log channel is powered by a "driver". The driver determines how and where t
-Name | Description
-------------- | -------------
-`custom` | A driver that calls a specified factory to create a channel
-`daily` | A `RotatingFileHandler` based Monolog driver which rotates daily
-`errorlog` | An `ErrorLogHandler` based Monolog driver
-`monolog` | A Monolog factory driver that may use any supported Monolog handler
-`papertrail` | A `SyslogUdpHandler` based Monolog driver
-`single` | A single file or path based logger channel (`StreamHandler`)
-`slack` | A `SlackWebhookHandler` based Monolog driver
-`stack` | A wrapper to facilitate creating "multi-channel" channels
-`syslog` | A `SyslogHandler` based Monolog driver
+| Name | Description |
+| ------------ | -------------------------------------------------------------------- |
+| `custom` | A driver that calls a specified factory to create a channel. |
+| `daily` | A `RotatingFileHandler` based Monolog driver which rotates daily. |
+| `errorlog` | An `ErrorLogHandler` based Monolog driver. |
+| `monolog` | A Monolog factory driver that may use any supported Monolog handler. |
+| `papertrail` | A `SyslogUdpHandler` based Monolog driver. |
+| `single` | A single file or path based logger channel (`StreamHandler`). |
+| `slack` | A `SlackWebhookHandler` based Monolog driver. |
+| `stack` | A wrapper to facilitate creating "multi-channel" channels. |
+| `syslog` | A `SyslogHandler` based Monolog driver. |
@@ -79,11 +79,11 @@ The `single` and `daily` channels have three optional configuration options: `bu
-Name | Description | Default
-------------- | ------------- | -------------
-`bubble` | Indicates if messages should bubble up to other channels after being handled | `true`
-`locking` | Attempt to lock the log file before writing to it | `false`
-`permission` | The log file's permissions | `0644`
+| Name | Description | Default |
+| ------------ | ----------------------------------------------------------------------------- | ------- |
+| `bubble` | Indicates if messages should bubble up to other channels after being handled. | `true` |
+| `locking` | Attempt to lock the log file before writing to it. | `false` |
+| `permission` | The log file's permissions. | `0644` |
@@ -91,9 +91,9 @@ Additionally, the retention policy for the `daily` channel can be configured via
-Name | Description | Default
-------------- |-------------------------------------------------------------------| -------------
-`days` | The number of days that daily log files should be retained | `7`
+| Name | Description | Default |
+| ------ | ----------------------------------------------------------- | ------- |
+| `days` | The number of days that daily log files should be retained. | `14` |
@@ -295,7 +295,7 @@ If you would like to share contextual information across _all_ logging channels,
}
}
-> [!NOTE]
+> [!NOTE]
> If you need to share log context while processing queued jobs, you may utilize [job middleware](/docs/{{version}}/queues#job-middleware).
@@ -417,13 +417,12 @@ If you are using a Monolog handler that is capable of providing its own formatte
'formatter' => 'default',
],
+
+#### Monolog Processors
-
- #### Monolog Processors
-
- Monolog can also process messages before logging them. You can create your own processors or use the [existing processors offered by Monolog](https://github.com/Seldaek/monolog/tree/main/src/Monolog/Processor).
+Monolog can also process messages before logging them. You can create your own processors or use the [existing processors offered by Monolog](https://github.com/Seldaek/monolog/tree/main/src/Monolog/Processor).
- If you would like to customize the processors for a `monolog` driver, add a `processors` configuration value to your channel's configuration:
+If you would like to customize the processors for a `monolog` driver, add a `processors` configuration value to your channel's configuration:
'memory' => [
'driver' => 'monolog',
@@ -443,7 +442,6 @@ If you are using a Monolog handler that is capable of providing its own formatte
],
],
-
### Creating Custom Channels via Factories
diff --git a/mail.md b/mail.md
index b29c720bfd4..af1fe496b8e 100644
--- a/mail.md
+++ b/mail.md
@@ -36,7 +36,7 @@
## Introduction
-Sending email doesn't have to be complicated. Laravel provides a clean, simple email API powered by the popular [Symfony Mailer](https://symfony.com/doc/7.0/mailer.html) component. Laravel and Symfony Mailer provide drivers for sending email via SMTP, Mailgun, Postmark, Amazon SES, and `sendmail`, allowing you to quickly get started sending mail through a local or cloud based service of your choice.
+Sending email doesn't have to be complicated. Laravel provides a clean, simple email API powered by the popular [Symfony Mailer](https://symfony.com/doc/7.0/mailer.html) component. Laravel and Symfony Mailer provide drivers for sending email via SMTP, Mailgun, Postmark, Resend, Amazon SES, and `sendmail`, allowing you to quickly get started sending mail through a local or cloud based service of your choice.
### Configuration
@@ -48,7 +48,7 @@ Within your `mail` configuration file, you will find a `mailers` configuration a
### Driver / Transport Prerequisites
-The API based drivers such as Mailgun, Postmark, and MailerSend are often simpler and faster than sending mail via SMTP servers. Whenever possible, we recommend that you use one of these drivers.
+The API based drivers such as Mailgun, Postmark, Resend, and MailerSend are often simpler and faster than sending mail via SMTP servers. Whenever possible, we recommend that you use one of these drivers.
#### Mailgun Driver
@@ -89,7 +89,7 @@ If you are not using the United States [Mailgun region](https://documentation.ma
#### Postmark Driver
-To use the Postmark driver, install Symfony's Postmark Mailer transport via Composer:
+To use the [Postmark](https://postmarkapp.com/) driver, install Symfony's Postmark Mailer transport via Composer:
```shell
composer require symfony/postmark-mailer symfony/http-client
@@ -113,6 +113,21 @@ If you would like to specify the Postmark message stream that should be used by
This way you are also able to set up multiple Postmark mailers with different message streams.
+
+#### Resend Driver
+
+To use the [Resend](https://resend.com/) driver, install Resend's PHP SDK via Composer:
+
+```shell
+composer require resend/resend-php
+```
+
+Next, set the `default` option in your application's `config/mail.php` configuration file to `resend`. After configuring your application's default mailer, ensure that your `config/services.php` configuration file contains the following options:
+
+ 'resend' => [
+ 'key' => env('RESEND_KEY'),
+ ],
+
#### SES Driver
@@ -180,7 +195,7 @@ composer require mailersend/laravel-driver
Once the package is installed, add the `MAILERSEND_API_KEY` environment variable to your application's `.env` file. In addition, the `MAIL_MAILER` environment variable should be defined as `mailersend`:
-```shell
+```ini
MAIL_MAILER=mailersend
MAIL_FROM_ADDRESS=app@yourdomain.com
MAIL_FROM_NAME="App Name"
@@ -674,7 +689,7 @@ Some third-party email providers such as Mailgun and Postmark support message "t
);
}
-If your application is using the Mailgun driver, you may consult Mailgun's documentation for more information on [tags](https://documentation.mailgun.com/en/latest/user_manual.html#tagging-1) and [metadata](https://documentation.mailgun.com/en/latest/user_manual.html#attaching-data-to-messages). Likewise, the Postmark documentation may also be consulted for more information on their support for [tags](https://postmarkapp.com/blog/tags-support-for-smtp) and [metadata](https://postmarkapp.com/support/article/1125-custom-metadata-faq).
+If your application is using the Mailgun driver, you may consult Mailgun's documentation for more information on [tags](https://documentation.mailgun.com/docs/mailgun/user-manual/tracking-messages/#tagging) and [metadata](https://documentation.mailgun.com/docs/mailgun/user-manual/tracking-messages/#attaching-data-to-messages). Likewise, the Postmark documentation may also be consulted for more information on their support for [tags](https://postmarkapp.com/blog/tags-support-for-smtp) and [metadata](https://postmarkapp.com/support/article/1125-custom-metadata-faq).
If your application is using Amazon SES to send emails, you should use the `metadata` method to attach [SES "tags"](https://docs.aws.amazon.com/ses/latest/APIReference/API_MessageTag.html) to the message.
@@ -685,7 +700,7 @@ Laravel's mail capabilities are powered by Symfony Mailer. Laravel allows you to
use Illuminate\Mail\Mailables\Envelope;
use Symfony\Component\Mime\Email;
-
+
/**
* Get the message envelope.
*/
@@ -784,10 +799,10 @@ The table component allows you to transform a Markdown table into an HTML table.
```blade
-| Laravel | Table | Example |
-| ------------- |:-------------:| --------:|
-| Col 2 is | Centered | $10 |
-| Col 3 is | Right-Aligned | $20 |
+| Laravel | Table | Example |
+| ------------- | :-----------: | ------------: |
+| Col 2 is | Centered | $10 |
+| Col 3 is | Right-Aligned | $20 |
```
@@ -1118,6 +1133,12 @@ test('orders can be shipped', function () {
// Assert a mailable was sent twice...
Mail::assertSent(OrderShipped::class, 2);
+ // Assert a mailable was sent to an email address...
+ Mail::assertSent(OrderShipped::class, 'example@laravel.com');
+
+ // Assert a mailable was sent to multiple email addresses...
+ Mail::assertSent(OrderShipped::class, ['example@laravel.com', '...']);
+
// Assert a mailable was not sent...
Mail::assertNotSent(AnotherMailable::class);
@@ -1152,6 +1173,12 @@ class ExampleTest extends TestCase
// Assert a mailable was sent twice...
Mail::assertSent(OrderShipped::class, 2);
+ // Assert a mailable was sent to an email address...
+ Mail::assertSent(OrderShipped::class, 'example@laravel.com');
+
+ // Assert a mailable was sent to multiple email addresses...
+ Mail::assertSent(OrderShipped::class, ['example@laravel.com', '...']);
+
// Assert a mailable was not sent...
Mail::assertNotSent(AnotherMailable::class);
diff --git a/middleware.md b/middleware.md
index a99d965b9a0..95db7bb8b7d 100644
--- a/middleware.md
+++ b/middleware.md
@@ -27,7 +27,7 @@ To create a new middleware, use the `make:middleware` Artisan command:
php artisan make:middleware EnsureTokenIsValid
```
-This command will place a new `EnsureTokenIsValid` class within your `app/Http/Middleware` directory. In this middleware, we will only allow access to the route if the supplied `token` input matches a specified value. Otherwise, we will redirect the users back to the `home` URI:
+This command will place a new `EnsureTokenIsValid` class within your `app/Http/Middleware` directory. In this middleware, we will only allow access to the route if the supplied `token` input matches a specified value. Otherwise, we will redirect the users back to the `/home` URI:
input('token') !== 'my-secret-token') {
- return redirect('home');
+ return redirect('/home');
}
return $next($request);
@@ -61,7 +61,6 @@ It's best to envision middleware as a series of "layers" HTTP requests must pass
> [!NOTE]
> All middleware are resolved via the [service container](/docs/{{version}}/container), so you may type-hint any dependencies you need within a middleware's constructor.
-
#### Middleware and Responses
@@ -130,6 +129,7 @@ If you would like to manage Laravel's global middleware stack manually, you may
->withMiddleware(function (Middleware $middleware) {
$middleware->use([
+ \Illuminate\Foundation\Http\Middleware\InvokeDeferredCallbacks::class,
// \Illuminate\Http\Middleware\TrustHosts::class,
\Illuminate\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
@@ -140,7 +140,6 @@ If you would like to manage Laravel's global middleware stack manually, you may
]);
})
-
### Assigning Middleware to Routes
@@ -222,18 +221,26 @@ Middleware groups may be assigned to routes and controller actions using the sam
Laravel includes predefined `web` and `api` middleware groups that contain common middleware you may want to apply to your web and API routes. Remember, Laravel automatically applies these middleware groups to the corresponding `routes/web.php` and `routes/api.php` files:
-| The `web` Middleware Group
-|--------------
-| `Illuminate\Cookie\Middleware\EncryptCookies`
-| `Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse`
-| `Illuminate\Session\Middleware\StartSession`
-| `Illuminate\View\Middleware\ShareErrorsFromSession`
-| `Illuminate\Foundation\Http\Middleware\ValidateCsrfToken`
-| `Illuminate\Routing\Middleware\SubstituteBindings`
+
+
+| The `web` Middleware Group |
+| --- |
+| `Illuminate\Cookie\Middleware\EncryptCookies` |
+| `Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse` |
+| `Illuminate\Session\Middleware\StartSession` |
+| `Illuminate\View\Middleware\ShareErrorsFromSession` |
+| `Illuminate\Foundation\Http\Middleware\ValidateCsrfToken` |
+| `Illuminate\Routing\Middleware\SubstituteBindings` |
+
+
-| The `api` Middleware Group
-|--------------
-| `Illuminate\Routing\Middleware\SubstituteBindings`
+
+
+| The `api` Middleware Group |
+| --- |
+| `Illuminate\Routing\Middleware\SubstituteBindings` |
+
+
If you would like to append or prepend middleware to these groups, you may use the `web` and `api` methods within your application's `bootstrap/app.php` file. The `web` and `api` methods are convenient alternatives to the `appendToGroup` method:
@@ -294,7 +301,7 @@ If you would like to manually manage all of the middleware within Laravel's defa
### Middleware Aliases
-You may assign aliases to middleware in your application's `bootstrap/app.php` file. Middleware aliases allows you to define a short alias for a given middleware class, which can be especially useful for middleware with long class names:
+You may assign aliases to middleware in your application's `bootstrap/app.php` file. Middleware aliases allow you to define a short alias for a given middleware class, which can be especially useful for middleware with long class names:
use App\Http\Middleware\EnsureUserIsSubscribed;
@@ -312,20 +319,24 @@ Once the middleware alias has been defined in your application's `bootstrap/app.
For convenience, some of Laravel's built-in middleware are aliased by default. For example, the `auth` middleware is an alias for the `Illuminate\Auth\Middleware\Authenticate` middleware. Below is a list of the default middleware aliases:
-| Alias | Middleware
-|-------|------------
-`auth` | `Illuminate\Auth\Middleware\Authenticate`
-`auth.basic` | `Illuminate\Auth\Middleware\AuthenticateWithBasicAuth`
-`auth.session` | `Illuminate\Session\Middleware\AuthenticateSession`
-`cache.headers` | `Illuminate\Http\Middleware\SetCacheHeaders`
-`can` | `Illuminate\Auth\Middleware\Authorize`
-`guest` | `Illuminate\Auth\Middleware\RedirectIfAuthenticated`
-`password.confirm` | `Illuminate\Auth\Middleware\RequirePassword`
-`precognitive` | `Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests`
-`signed` | `Illuminate\Routing\Middleware\ValidateSignature`
-`subscribed` | `\Spark\Http\Middleware\VerifyBillableIsSubscribed`
-`throttle` | `Illuminate\Routing\Middleware\ThrottleRequests` or `Illuminate\Routing\Middleware\ThrottleRequestsWithRedis`
-`verified` | `Illuminate\Auth\Middleware\EnsureEmailIsVerified`
+
+
+| Alias | Middleware |
+| --- | --- |
+| `auth` | `Illuminate\Auth\Middleware\Authenticate` |
+| `auth.basic` | `Illuminate\Auth\Middleware\AuthenticateWithBasicAuth` |
+| `auth.session` | `Illuminate\Session\Middleware\AuthenticateSession` |
+| `cache.headers` | `Illuminate\Http\Middleware\SetCacheHeaders` |
+| `can` | `Illuminate\Auth\Middleware\Authorize` |
+| `guest` | `Illuminate\Auth\Middleware\RedirectIfAuthenticated` |
+| `password.confirm` | `Illuminate\Auth\Middleware\RequirePassword` |
+| `precognitive` | `Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests` |
+| `signed` | `Illuminate\Routing\Middleware\ValidateSignature` |
+| `subscribed` | `\Spark\Http\Middleware\VerifyBillableIsSubscribed` |
+| `throttle` | `Illuminate\Routing\Middleware\ThrottleRequests` or `Illuminate\Routing\Middleware\ThrottleRequestsWithRedis` |
+| `verified` | `Illuminate\Auth\Middleware\EnsureEmailIsVerified` |
+
+
### Sorting Middleware
@@ -384,15 +395,17 @@ Additional middleware parameters will be passed to the middleware after the `$ne
Middleware parameters may be specified when defining the route by separating the middleware name and parameters with a `:`:
+ use App\Http\Middleware\EnsureUserHasRole;
+
Route::put('/post/{id}', function (string $id) {
// ...
- })->middleware('role:editor');
+ })->middleware(EnsureUserHasRole::class.':editor');
Multiple parameters may be delimited by commas:
Route::put('/post/{id}', function (string $id) {
// ...
- })->middleware('role:editor,publisher');
+ })->middleware(EnsureUserHasRole::class.':editor,publisher');
## Terminable Middleware
diff --git a/migrations.md b/migrations.md
index 6df04a5d488..a0be8bed27a 100644
--- a/migrations.md
+++ b/migrations.md
@@ -71,7 +71,7 @@ php artisan schema:dump --database=testing --prune
You should commit your database schema file to source control so that other new developers on your team may quickly create your application's initial database structure.
> [!WARNING]
-> Migration squashing is only available for the MySQL, PostgreSQL, and SQLite databases and utilizes the database's command-line client.
+> Migration squashing is only available for the MariaDB, MySQL, PostgreSQL, and SQLite databases and utilizes the database's command-line client.
## Migration Structure
@@ -191,7 +191,7 @@ php artisan migrate:rollback --step=5
You may roll back a specific "batch" of migrations by providing the `batch` option to the `rollback` command, where the `batch` option corresponds to a batch value within your application's `migrations` database table. For example, the following command will roll back all migrations in batch three:
```shell
- php artisan migrate:rollback --batch=3
+php artisan migrate:rollback --batch=3
```
If you would like to see the SQL statements that will be executed by the migrations without actually running them, you may provide the `--pretend` flag to the `migrate:rollback` command:
@@ -290,7 +290,7 @@ If you want to perform a schema operation on a database connection that is not y
$table->id();
});
-In addition, a few other properties and methods may be used to define other aspects of the table's creation. The `engine` property may be used to specify the table's storage engine when using MySQL:
+In addition, a few other properties and methods may be used to define other aspects of the table's creation. The `engine` property may be used to specify the table's storage engine when using MariaDB or MySQL:
Schema::create('users', function (Blueprint $table) {
$table->engine('InnoDB');
@@ -298,7 +298,7 @@ In addition, a few other properties and methods may be used to define other aspe
// ...
});
-The `charset` and `collation` properties may be used to specify the character set and collation for the created table when using MySQL:
+The `charset` and `collation` properties may be used to specify the character set and collation for the created table when using MariaDB or MySQL:
Schema::create('users', function (Blueprint $table) {
$table->charset('utf8mb4');
@@ -315,7 +315,7 @@ The `temporary` method may be used to indicate that the table should be "tempora
// ...
});
-If you would like to add a "comment" to a database table, you may invoke the `comment` method on the table instance. Table comments are currently only supported by MySQL and PostgreSQL:
+If you would like to add a "comment" to a database table, you may invoke the `comment` method on the table instance. Table comments are currently only supported by MariaDB, MySQL, and PostgreSQL:
Schema::create('calculations', function (Blueprint $table) {
$table->comment('Business calculations');
@@ -458,6 +458,7 @@ The schema builder blueprint offers a variety of methods that correspond to the
[uuidMorphs](#column-method-uuidMorphs)
[ulid](#column-method-ulid)
[uuid](#column-method-uuid)
+[vector](#column-method-vector)
[year](#column-method-year)
@@ -627,7 +628,7 @@ The `integer` method creates an `INTEGER` equivalent column:
The `ipAddress` method creates a `VARCHAR` equivalent column:
$table->ipAddress('visitor');
-
+
When using PostgreSQL, an `INET` column will be created.
+
+| Modifier | Description |
+| ----------------------------------- | ---------------------------------------------------------------------------------------------- |
+| `->after('column')` | Place the column "after" another column (MariaDB / MySQL). |
+| `->autoIncrement()` | Set `INTEGER` columns as auto-incrementing (primary key). |
+| `->charset('utf8mb4')` | Specify a character set for the column (MariaDB / MySQL). |
+| `->collation('utf8mb4_unicode_ci')` | Specify a collation for the column. |
+| `->comment('my comment')` | Add a comment to a column (MariaDB / MySQL / PostgreSQL). |
+| `->default($value)` | Specify a "default" value for the column. |
+| `->first()` | Place the column "first" in the table (MariaDB / MySQL). |
+| `->from($integer)` | Set the starting value of an auto-incrementing field (MariaDB / MySQL / PostgreSQL). |
+| `->invisible()` | Make the column "invisible" to `SELECT *` queries (MariaDB / MySQL). |
+| `->nullable($value = true)` | Allow `NULL` values to be inserted into the column. |
+| `->storedAs($expression)` | Create a stored generated column (MariaDB / MySQL / PostgreSQL / SQLite). |
+| `->unsigned()` | Set `INTEGER` columns as `UNSIGNED` (MariaDB / MySQL). |
+| `->useCurrent()` | Set `TIMESTAMP` columns to use `CURRENT_TIMESTAMP` as default value. |
+| `->useCurrentOnUpdate()` | Set `TIMESTAMP` columns to use `CURRENT_TIMESTAMP` when a record is updated (MariaDB / MySQL). |
+| `->virtualAs($expression)` | Create a virtual generated column (MariaDB / MySQL / SQLite). |
+| `->generatedAs($expression)` | Create an identity column with specified sequence options (PostgreSQL). |
+| `->always()` | Defines the precedence of sequence values over input for an identity column (PostgreSQL). |
+
+
+
+| Command | Description |
+| ----------------------------------- | ----------------------------------------------------- |
+| `$table->dropMorphs('morphable');` | Drop the `morphable_id` and `morphable_type` columns. |
+| `$table->dropRememberToken();` | Drop the `remember_token` column. |
+| `$table->dropSoftDeletes();` | Drop the `deleted_at` column. |
+| `$table->dropSoftDeletesTz();` | Alias of `dropSoftDeletes()` method. |
+| `$table->dropTimestamps();` | Drop the `created_at` and `updated_at` columns. |
+| `$table->dropTimestampsTz();` | Alias of `dropTimestamps()` method. |
+
+
+
+| Command | Description |
+| ------------------------------------------------ | -------------------------------------------------------------- |
+| `$table->primary('id');` | Adds a primary key. |
+| `$table->primary(['id', 'parent_id']);` | Adds composite keys. |
+| `$table->unique('email');` | Adds a unique index. |
+| `$table->index('state');` | Adds an index. |
+| `$table->fullText('body');` | Adds a full text index (MariaDB / MySQL / PostgreSQL). |
+| `$table->fullText('body')->language('english');` | Adds a full text index of the specified language (PostgreSQL). |
+| `$table->spatialIndex('location');` | Adds a spatial index (except SQLite). |
+
+
+
+| Command | Description |
+| -------------------------------------------------------- | ----------------------------------------------------------- |
+| `$table->dropPrimary('users_id_primary');` | Drop a primary key from the "users" table. |
+| `$table->dropUnique('users_email_unique');` | Drop a unique index from the "users" table. |
+| `$table->dropIndex('geo_state_index');` | Drop a basic index from the "geo" table. |
+| `$table->dropFullText('posts_body_fulltext');` | Drop a full text index from the "posts" table. |
+| `$table->dropSpatialIndex('geo_location_spatialindex');` | Drop a spatial index from the "geo" table (except SQLite). |
+
+
If you pass an array of columns into a method that drops indexes, the conventional index name will be generated based on the table name, columns, and index type:
@@ -1168,14 +1192,20 @@ You may also specify the desired action for the "on delete" and "on update" prop
An alternative, expressive syntax is also provided for these actions:
+
+
| Method | Description |
-|-------------------------------|---------------------------------------------------|
+| ----------------------------- | ------------------------------------------------- |
| `$table->cascadeOnUpdate();` | Updates should cascade. |
| `$table->restrictOnUpdate();` | Updates should be restricted. |
+| `$table->nullOnUpdate();` | Updates should set the foreign key value to null. |
| `$table->noActionOnUpdate();` | No action on updates. |
| `$table->cascadeOnDelete();` | Deletes should cascade. |
| `$table->restrictOnDelete();` | Deletes should be restricted. |
| `$table->nullOnDelete();` | Deletes should set the foreign key value to null. |
+| `$table->noActionOnDelete();` | Prevents deletes if child records exist. |
+
+
Any additional [column modifiers](#column-modifiers) must be called before the `constrained` method:
@@ -1208,18 +1238,23 @@ You may enable or disable foreign key constraints within your migrations by usin
});
> [!WARNING]
-> SQLite disables foreign key constraints by default. When using SQLite, make sure to [enable foreign key support](/docs/{{version}}/database#configuration) in your database configuration before attempting to create them in your migrations. In addition, SQLite only supports foreign keys upon creation of the table and [not when tables are altered](https://www.sqlite.org/omitted.html).
+> SQLite disables foreign key constraints by default. When using SQLite, make sure to [enable foreign key support](/docs/{{version}}/database#configuration) in your database configuration before attempting to create them in your migrations.
+
+| Class | Description |
+| ------------------------------------------------ | ------------------------------------------------ |
+| `Illuminate\Database\Events\MigrationsStarted` | A batch of migrations is about to be executed. |
+| `Illuminate\Database\Events\MigrationsEnded` | A batch of migrations has finished executing. |
+| `Illuminate\Database\Events\MigrationStarted` | A single migration is about to be executed. |
+| `Illuminate\Database\Events\MigrationEnded` | A single migration has finished executing. |
+| `Illuminate\Database\Events\NoPendingMigrations` | A migration command found no pending migrations. |
+| `Illuminate\Database\Events\SchemaDumped` | A database schema dump has completed. |
+| `Illuminate\Database\Events\SchemaLoaded` | An existing database schema dump has loaded. |
+
+
diff --git a/mocking.md b/mocking.md
index 550da118b19..186e29f6bdf 100644
--- a/mocking.md
+++ b/mocking.md
@@ -240,7 +240,7 @@ You may also provide a closure to the various time travel methods. The closure w
$this->travel(5)->days(function () {
// Test something five days into the future...
});
-
+
$this->travelTo(now()->subDays(10), function () {
// Test something during a given moment...
});
diff --git a/mongodb.md b/mongodb.md
new file mode 100644
index 00000000000..af992cd0d24
--- /dev/null
+++ b/mongodb.md
@@ -0,0 +1,99 @@
+# MongoDB
+
+- [Introduction](#introduction)
+- [Installation](#installation)
+ - [MongoDB Driver](#mongodb-driver)
+ - [Starting a MongoDB Server](#starting-a-mongodb-server)
+ - [Install the Laravel MongoDB Package](#install-the-laravel-mongodb-package)
+- [Configuration](#configuration)
+- [Features](#features)
+
+