diff --git a/installation.md b/installation.md index e2e3c43431f..881e1ffb70b 100644 --- a/installation.md +++ b/installation.md @@ -18,6 +18,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) @@ -361,6 +363,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 diff --git a/queries.md b/queries.md index 72e474e858e..7038a52986f 100644 --- a/queries.md +++ b/queries.md @@ -1236,7 +1236,7 @@ While not obligatory, it is recommended to wrap pessimistic locks within a [tran ->find(1); $receiver = DB::table('users') - ->lockForUpdate(); + ->lockForUpdate() ->find(2); if ($sender->balance < 100) { diff --git a/redis.md b/redis.md index 7615f351090..6bd6afec860 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.