From 72e03487cdcbf5eb302e086fa481bddc82c3b786 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Mon, 8 Apr 2024 17:41:34 +0100 Subject: [PATCH 01/13] [10.x] Refines Reverb documentation (#9566) * differentiate variables * typo --- reverb.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/reverb.md b/reverb.md index 2300d9abbf1..9142b46701a 100644 --- a/reverb.md +++ b/reverb.md @@ -82,11 +82,11 @@ For example, you may wish to maintain a single Laravel application which, via Re ```php 'apps' => [ [ - 'id' => 'my-app-one', + 'app_id' => 'my-app-one', // ... ], [ - 'id' => 'my-app-two', + 'app_id' => 'my-app-two', // ... ], ], @@ -134,6 +134,16 @@ php artisan reverb:start --host=127.0.0.1 --port=9000 Alternatively, you may define `REVERB_SERVER_HOST` and `REVERB_SERVER_PORT` environment variables in your application's `.env` configuration file. +The `REVERB_SERVER_HOST` and `REVERB_SERVER_PORT` environment variables should not be confused with `REVERB_HOST` and `REVERB_PORT`. The former specify the host and port on which to run the Reverb server itself, while the latter pair instruct Laravel where to send broadcast messages. For example, in a production environment, you may route requests from your public Reverb hostname on port `443` to a Reverb server operating on `0.0.0.0:8080`. In this scenario, your environment variables would be defined as follows: + +```ini +REVERB_SERVER_HOST=0.0.0.0 +REVERB_SERVER_PORT=8080 + +REVERB_HOST=ws.laravel.com +REVERB_PORT=443 +``` + ### Debugging From 5a5a6b902e29f240f3489ea4d4f8176de9cced76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 1 May 2024 17:46:14 +0200 Subject: [PATCH 02/13] [10.x] Mention the LARAVEL_STORAGE_PATH env var (#9612) * [10.x] Mention the LARAVEL_STORAGE_PATH env var * Update structure.md --------- Co-authored-by: Taylor Otwell --- structure.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/structure.md b/structure.md index 1598f50f2d4..be3092fdf2e 100644 --- a/structure.md +++ b/structure.md @@ -88,6 +88,8 @@ The `storage` directory contains your logs, compiled Blade templates, file based The `storage/app/public` directory may be used to store user-generated files, such as profile avatars, that should be publicly accessible. You should create a symbolic link at `public/storage` which points to this directory. You may create the link using the `php artisan storage:link` Artisan command. +The location of the `storage` directory can be modified via the `LARAVEL_STORAGE_PATH` environment variable. + #### The Tests Directory From eb47405f41fcc027f7df096c3ef9c841e941348d Mon Sep 17 00:00:00 2001 From: Raisul Hridoy <46390389+hridoyraisul@users.noreply.github.com> Date: Mon, 6 May 2024 23:13:01 +0600 Subject: [PATCH 03/13] =?UTF-8?q?Refactor:=20Update=20namespace=20from=20\?= =?UTF-8?q?App\Order=20to=20\App\Models\Order=20in=20Or=E2=80=A6=20(#9637)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor: Update namespace from \App\Order to \App\Models\Order in OrderShipmentStatusUpdated event * Delete .idea/workspace.xml --------- Co-authored-by: raisulhridoy Co-authored-by: Taylor Otwell --- broadcasting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/broadcasting.md b/broadcasting.md index 66fad8b52e8..3d6bbc9ce2e 100644 --- a/broadcasting.md +++ b/broadcasting.md @@ -346,7 +346,7 @@ When a user is viewing one of their orders, we don't want them to have to refres /** * The order instance. * - * @var \App\Order + * @var \App\Models\Order */ public $order; } From 9d1f50bb65b133e8cbd20369a1e1bcfe8775c5de Mon Sep 17 00:00:00 2001 From: Samuel Date: Thu, 23 May 2024 20:42:49 +0200 Subject: [PATCH 04/13] Added missing middleware in middlewarePriority array (#9671) --- middleware.md | 1 + 1 file changed, 1 insertion(+) diff --git a/middleware.md b/middleware.md index 20f99bd7665..7243c520d76 100644 --- a/middleware.md +++ b/middleware.md @@ -238,6 +238,7 @@ Rarely, you may need your middleware to execute in a specific order but not have protected $middlewarePriority = [ \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class, \Illuminate\Cookie\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests::class, From 25ab5b290cd1cdd5b068a91c9091d57fa46339dc Mon Sep 17 00:00:00 2001 From: Mohamed Elhaj <50548630+HajMo@users.noreply.github.com> Date: Mon, 15 Jul 2024 18:00:39 +0300 Subject: [PATCH 05/13] [10.x] Remove the beta flag for reverb (#9756) * Update reverb.md * Update broadcasting.md * Update reverb.md * Update broadcasting.md --- broadcasting.md | 4 ++-- reverb.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/broadcasting.md b/broadcasting.md index 3d6bbc9ce2e..762e0767810 100644 --- a/broadcasting.md +++ b/broadcasting.md @@ -84,10 +84,10 @@ You will also need to configure and run a [queue worker](/docs/{{version}}/queue ### Reverb -You may install Reverb using the Composer package manager. Since Reverb is currently in beta, you will need to explicitly install the beta release: +You may install Reverb using the Composer package manager: ```sh -composer require laravel/reverb:@beta +composer require laravel/reverb ``` Once the package is installed, you may run Reverb's installation command to publish the configuration, update your applications's broadcasting configuration, and add Reverb's required environment variables: diff --git a/reverb.md b/reverb.md index 9142b46701a..b9ebec2b5a7 100644 --- a/reverb.md +++ b/reverb.md @@ -29,10 +29,10 @@ > [!WARNING] > Laravel Reverb requires PHP 8.2+ and Laravel 10.47+. -You may use the Composer package manager to install Reverb into your Laravel project. Since Reverb is currently in beta, you will need to explicitly install the beta release: +You may use the Composer package manager to install Reverb into your Laravel project: ```sh -composer require laravel/reverb:@beta +composer require laravel/reverb ``` Once the package is installed, you may run Reverb's installation command to publish the configuration, add Reverb's required environment variables, and enable event broadcasting in your application: From f05a4131b0a97679ae4feffe113617f2c6b9f1b2 Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Tue, 27 Aug 2024 22:59:52 +1000 Subject: [PATCH 06/13] Header fixes (#9852) --- middleware.md | 1 - routing.md | 1 - session.md | 2 +- strings.md | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/middleware.md b/middleware.md index 7243c520d76..33d819af003 100644 --- a/middleware.md +++ b/middleware.md @@ -60,7 +60,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 diff --git a/routing.md b/routing.md index 56eafe552ce..99e857ce01c 100644 --- a/routing.md +++ b/routing.md @@ -469,7 +469,6 @@ Typically, implicit model binding will not retrieve models that have been [soft return $user->email; })->withTrashed(); - #### Customizing the Key diff --git a/session.md b/session.md index 8545e13212c..f203adec8d2 100644 --- a/session.md +++ b/session.md @@ -199,7 +199,7 @@ The `pull` method will retrieve and delete an item from the session in a single $value = $request->session()->pull('key', 'default'); - + #### Incrementing and Decrementing Session Values If your session data contains an integer you wish to increment or decrement, you may use the `increment` and `decrement` methods: diff --git a/strings.md b/strings.md index be97a8c241e..263ed452039 100644 --- a/strings.md +++ b/strings.md @@ -363,7 +363,6 @@ The `Str::camel` method converts the given string to `camelCase`: // 'fooBar' - #### `Str::charAt()` {.collection-method} The `Str::charAt` method returns the character at the specified index. If the index is out of bounds, `false` is returned: From 7e31f27a1a63e5c1648ede4e37fed37a06c7de75 Mon Sep 17 00:00:00 2001 From: Salim Djerbouh <13698160+CaddyDz@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:31:11 +0100 Subject: [PATCH 07/13] [10.x]: Updated Http `fake` method callback signature to include options array (#10000) * [10.x]: Updated Http `fake` method callback signature to include options array Sometimes we need to access the PendingRequest options like the timeout value in a test case, hopefully this could save someone else time in the future * Update http-client.md --------- Co-authored-by: Taylor Otwell --- http-client.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-client.md b/http-client.md index c172dc8a31c..3f09b3f69b2 100644 --- a/http-client.md +++ b/http-client.md @@ -548,11 +548,11 @@ If you would like to fake a sequence of responses but do not need to specify a s #### Fake Callback -If you require more complicated logic to determine what responses to return for certain endpoints, you may pass a closure to the `fake` method. This closure will receive an instance of `Illuminate\Http\Client\Request` and should return a response instance. Within your closure, you may perform whatever logic is necessary to determine what type of response to return: +If you require more complicated logic to determine what responses to return for certain endpoints, you may pass a closure to the `fake` method. This closure will receive an instance of `Illuminate\Http\Client\Request` as well as an array of options. The closure should return a response instance. Within your closure, you may perform whatever logic is necessary to determine what type of response to return: use Illuminate\Http\Client\Request; - Http::fake(function (Request $request) { + Http::fake(function (Request $request, array $options) { return Http::response('Hello World', 200); }); From 4a2567e65b1ad8c7c1f09e629a9933e13476f158 Mon Sep 17 00:00:00 2001 From: Mubariz Hajimuradov <11701997+muba00@users.noreply.github.com> Date: Wed, 22 Jan 2025 23:05:54 +0100 Subject: [PATCH 08/13] Update installation.md (#10129) * Update installation.md composer create-project command will return an error if laravel/laravel:^10.0 isn't inside quotes, fixed. * Update installation.md --------- Co-authored-by: Taylor Otwell --- installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installation.md b/installation.md index ed1d5c45300..6499c4232b5 100644 --- a/installation.md +++ b/installation.md @@ -58,7 +58,7 @@ Before creating your first Laravel project, make sure that your local machine ha After you have installed PHP and Composer, you may create a new Laravel project via Composer's `create-project` command: ```nothing -composer create-project laravel/laravel:^10.0 example-app +composer create-project "laravel/laravel:^10.0" example-app ``` Or, you may create new Laravel projects by globally installing [the Laravel installer](https://github.com/laravel/installer) via Composer: From 9153865ffc841c33b8f1a3225e43ad7d0424a9d7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 23 Feb 2025 18:50:40 -0600 Subject: [PATCH 09/13] update api docs --- documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation.md b/documentation.md index 18b0c1ca65a..638ca34947f 100644 --- a/documentation.md +++ b/documentation.md @@ -103,4 +103,4 @@ - [Socialite](/docs/{{version}}/socialite) - [Telescope](/docs/{{version}}/telescope) - [Valet](/docs/{{version}}/valet) -- [API Documentation](/api/10.x) +- [API Documentation](https://api.laravel.com/docs/10.x) From ac2e2577fe6f8c58f559bae2cfec37f29baeac66 Mon Sep 17 00:00:00 2001 From: Kathryn Reeve <67553+BinaryKitten@users.noreply.github.com> Date: Wed, 28 May 2025 14:01:56 +0100 Subject: [PATCH 10/13] backport Laravel 11 dates to Laravel 10 docs (#10460) This takes the latest dates from the Laravel 12 docs as they pertain to version 11 release and support dates and updates them in the Laravel 10 details --- releases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases.md b/releases.md index 73d13d96209..010d1a5a608 100644 --- a/releases.md +++ b/releases.md @@ -29,7 +29,7 @@ For all Laravel releases, bug fixes are provided for 18 months and security fixe | 8 | 7.3 - 8.1 | September 8th, 2020 | July 26th, 2022 | January 24th, 2023 | | 9 | 8.0 - 8.2 | February 8th, 2022 | August 8th, 2023 | February 6th, 2024 | | 10 | 8.1 - 8.3 | February 14th, 2023 | August 6th, 2024 | February 4th, 2025 | -| 11 | 8.2 - 8.3 | March 12th, 2024 | August 5th, 2025 | February 3rd, 2026 | +| 11 | 8.2 - 8.4 | March 12th, 2024 | September 3rd, 2025 | March 12th, 2026 | From fdf1d85a032b220060cc246bd3ed643259197903 Mon Sep 17 00:00:00 2001 From: Enes Karabacak <31873838+enes1004@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:02:13 +0900 Subject: [PATCH 11/13] =?UTF-8?q?=E3=80=9010.x=E3=80=91Individual=20wrappi?= =?UTF-8?q?ng=20in=20`Collection::sortByMany`=20allows=20sorting=20with=20?= =?UTF-8?q?multiple=20attributes=20by=20just=20an=20array=20of=20attribute?= =?UTF-8?q?s(without=20direction,=20defaulting=20to=20asceding=20sort),=20?= =?UTF-8?q?but=20the=20spec=20is=20missing=20in=20docs=20(#10581)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update collections.md * Update collections.md --------- Co-authored-by: Taylor Otwell --- collections.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/collections.md b/collections.md index bc1a9782f17..d0abb4f5897 100644 --- a/collections.md +++ b/collections.md @@ -2437,7 +2437,31 @@ Alternatively, you may pass your own closure to determine how to sort the collec ] */ -If you would like to sort your collection by multiple attributes, you may pass an array of sort operations to the `sortBy` method. Each sort operation should be an array consisting of the attribute that you wish to sort by and the direction of the desired sort: +If you would like to sort your collection by multiple attributes, you may pass an array of the attributes that you wish to sort by: + + $collection = collect([ + ['name' => 'Taylor Otwell', 'age' => 34], + ['name' => 'Abigail Otwell', 'age' => 30], + ['name' => 'Taylor Otwell', 'age' => 36], + ['name' => 'Abigail Otwell', 'age' => 32], + ]); + + $sorted = $collection->sortBy(['name', 'age']); + + $sorted->values()->all(); + + /* + [ + ['name' => 'Abigail Otwell', 'age' => 30], + ['name' => 'Abigail Otwell', 'age' => 32], + ['name' => 'Taylor Otwell', 'age' => 34], + ['name' => 'Taylor Otwell', 'age' => 36], + ] + */ + + + +When sorting in multiple attributes and directions, you may pass an array of sort operations to the `sortBy` method. Each sort operation should be an array consisting of the attribute that you wish to sort by and the direction of the desired sort: $collection = collect([ ['name' => 'Taylor Otwell', 'age' => 34], From ecd3d4997bcf2668a8b3d6aefb80fe768c4e7c8e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 18 Aug 2025 12:52:10 -0500 Subject: [PATCH 12/13] wip --- installation.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/installation.md b/installation.md index 6499c4232b5..7c4b311b79c 100644 --- a/installation.md +++ b/installation.md @@ -13,6 +13,8 @@ - [Sail on Linux](#sail-on-linux) - [Choosing Your Sail Services](#choosing-your-sail-services) - [IDE Support](#ide-support) +- [Laravel and AI](#laravel-and-ai) + - [Installing Laravel Boost](#installing-laravel-boost) - [Next Steps](#next-steps) - [Laravel the Full Stack Framework](#laravel-the-fullstack-framework) - [Laravel the API Backend](#laravel-the-api-backend) @@ -265,6 +267,37 @@ You are free to use any code editor you wish when developing Laravel application In addition, the community maintained [Laravel Idea](https://laravel-idea.com/) PhpStorm plugin offers a variety of helpful IDE augmentations, including code generation, Eloquent syntax completion, validation rule completion, and more. + +## Laravel and AI + +[Laravel Boost](https://github.com/laravel/boost) is a powerful tool that bridges the gap between AI coding agents and Laravel applications. Boost provides AI agents with Laravel-specific context, tools, and guidelines so they can generate more accurate, version-specific code that follows Laravel conventions. + +When you install Boost in your Laravel application, AI agents gain access to over 15 specialized tools including the ability to know which packages you are using, query your database, search the Laravel documentation, read browser logs, generate tests, and execute code via Tinker. + +In addition, Boost gives AI agents access to over 17,000 pieces of vectorized Laravel ecosystem documentation, specific to your installed package versions. This means agents can provide guidance targeted to the exact versions your project uses. + +Boost also includes Laravel-maintained AI guidelines that nudge agents to follow framework conventions, write appropriate tests, and avoid common pitfalls when generating Laravel code. + + +### Installing Laravel Boost + +Boost can be installed in Laravel 10, 11, and 12 applications running PHP 8.1 or higher. To get started, install Boost as a development dependency: + +```shell +composer require laravel/boost --dev +``` + +Once installed, run the interactive installer: + +```shell +php artisan boost:install +``` + +The installer will auto-detect your IDE and AI agents, allowing you to opt into the features that make sense for your project. Boost respects existing project conventions and doesn't force opinionated style rules by default. + +> [!NOTE] +> To learn more about Boost, check out the [Laravel Boost repository on GitHub](https://github.com/laravel/boost). + ## Next Steps From 559c3659ed98d529974d24326f0fb3db66235215 Mon Sep 17 00:00:00 2001 From: Grant Bennett <46636653+nebarg@users.noreply.github.com> Date: Thu, 28 Aug 2025 20:16:50 +0100 Subject: [PATCH 13/13] update redis documentation urls (#10783) --- redis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis.md b/redis.md index 4807ce752f5..ab37c15f9e0 100644 --- a/redis.md +++ b/redis.md @@ -13,7 +13,7 @@ ## Introduction -[Redis](https://redis.io) is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain [strings](https://redis.io/docs/data-types/strings/), [hashes](https://redis.io/docs/data-types/hashes/), [lists](https://redis.io/docs/data-types/lists/), [sets](https://redis.io/docs/data-types/sets/), and [sorted sets](https://redis.io/docs/data-types/sorted-sets/). +[Redis](https://redis.io) is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain [strings](https://redis.io/docs/latest/develop/data-types/strings/), [hashes](https://redis.io/docs/latest/develop/data-types/hashes/), [lists](https://redis.io/docs/latest/develop/data-types/lists/), [sets](https://redis.io/docs/latest/develop/data-types/sets/), and [sorted sets](https://redis.io/docs/latest/develop/data-types/sorted-sets/). Before using Redis with Laravel, we encourage you to install and use the [PhpRedis](https://github.com/phpredis/phpredis) PHP extension via PECL. The extension is more complex to install compared to "user-land" PHP packages but may yield better performance for applications that make heavy use of Redis. If you are using [Laravel Sail](/docs/{{version}}/sail), this extension is already installed in your application's Docker container.