Skip to content

Commit 68c1d75

Browse files
authored
12.x Docs (#10188)
1 parent 1cd90c8 commit 68c1d75

22 files changed

+437
-169
lines changed

authentication.md

+6-18
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Your application's authentication configuration file is located at `config/auth.
4848

4949
Want to get started fast? Install a [Laravel application starter kit](/docs/{{version}}/starter-kits) in a fresh Laravel application. After migrating your database, navigate your browser to `/register` or any other URL that is assigned to your application. The starter kits will take care of scaffolding your entire authentication system!
5050

51-
**Even if you choose not to use a starter kit in your final Laravel application, installing the [Laravel Breeze](/docs/{{version}}/starter-kits#laravel-breeze) starter kit can be a wonderful opportunity to learn how to implement all of Laravel's authentication functionality in an actual Laravel project.** Since Laravel Breeze creates authentication controllers, routes, and views for you, you can examine the code within these files to learn how Laravel's authentication features may be implemented.
51+
**Even if you choose not to use a starter kit in your final Laravel application, installing a [starter kit](/docs/{{version}}/starter-kits) can be a wonderful opportunity to learn how to implement all of Laravel's authentication functionality in an actual Laravel project.** Since the Laravel starter kits contain authentication controllers, routes, and views for you, you can examine the code within these files to learn how Laravel's authentication features may be implemented.
5252

5353
<a name="introduction-database-considerations"></a>
5454
### Database Considerations
@@ -77,13 +77,7 @@ Laravel includes built-in authentication and session services which are typicall
7777

7878
**Application Starter Kits**
7979

80-
As discussed in this documentation, you can interact with these authentication services manually to build your application's own authentication layer. However, to help you get started more quickly, we have released [free packages](/docs/{{version}}/starter-kits) that provide robust, modern scaffolding of the entire authentication layer. These packages are [Laravel Breeze](/docs/{{version}}/starter-kits#laravel-breeze), [Laravel Jetstream](/docs/{{version}}/starter-kits#laravel-jetstream), and [Laravel Fortify](/docs/{{version}}/fortify).
81-
82-
_Laravel Breeze_ is a simple, minimal implementation of all of Laravel's authentication features, including login, registration, password reset, email verification, and password confirmation. Laravel Breeze's view layer is comprised of simple [Blade templates](/docs/{{version}}/blade) styled with [Tailwind CSS](https://tailwindcss.com). To get started, check out the documentation on Laravel's [application starter kits](/docs/{{version}}/starter-kits).
83-
84-
_Laravel Fortify_ is a headless authentication backend for Laravel that implements many of the features found in this documentation, including cookie-based authentication as well as other features such as two-factor authentication and email verification. Fortify provides the authentication backend for Laravel Jetstream or may be used independently in combination with [Laravel Sanctum](/docs/{{version}}/sanctum) to provide authentication for an SPA that needs to authenticate with Laravel.
85-
86-
_[Laravel Jetstream](https://jetstream.laravel.com)_ is a robust application starter kit that consumes and exposes Laravel Fortify's authentication services with a beautiful, modern UI powered by [Tailwind CSS](https://tailwindcss.com), [Livewire](https://livewire.laravel.com), and / or [Inertia](https://inertiajs.com). Laravel Jetstream includes optional support for two-factor authentication, team support, browser session management, profile management, and built-in integration with [Laravel Sanctum](/docs/{{version}}/sanctum) to offer API token authentication. Laravel's API authentication offerings are discussed below.
80+
As discussed in this documentation, you can interact with these authentication services manually to build your application's own authentication layer. However, to help you get started more quickly, we have released [free starter kits](/docs/{{version}}/starter-kits) that provide robust, modern scaffolding of the entire authentication layer.
8781

8882
<a name="laravels-api-authentication-services"></a>
8983
#### Laravel's API Authentication Services
@@ -100,8 +94,6 @@ In response to the complexity of OAuth2 and developer confusion, we set out to b
10094

10195
Laravel Sanctum is a hybrid web / API authentication package that can manage your application's entire authentication process. This is possible because when Sanctum based applications receive a request, Sanctum will first determine if the request includes a session cookie that references an authenticated session. Sanctum accomplishes this by calling Laravel's built-in authentication services which we discussed earlier. If the request is not being authenticated via a session cookie, Sanctum will inspect the request for an API token. If an API token is present, Sanctum will authenticate the request using that token. To learn more about this process, please consult Sanctum's ["how it works"](/docs/{{version}}/sanctum#how-it-works) documentation.
10296

103-
Laravel Sanctum is the API package we have chosen to include with the [Laravel Jetstream](https://jetstream.laravel.com) application starter kit because we believe it is the best fit for the majority of web application's authentication needs.
104-
10597
<a name="summary-choosing-your-stack"></a>
10698
#### Summary and Choosing Your Stack
10799

@@ -113,7 +105,7 @@ If you are building a single-page application (SPA) that will be powered by a La
113105

114106
Passport may be chosen when your application absolutely needs all of the features provided by the OAuth2 specification.
115107

116-
And, if you would like to get started quickly, we are pleased to recommend [Laravel Breeze](/docs/{{version}}/starter-kits#laravel-breeze) as a quick way to start a new Laravel application that already uses our preferred authentication stack of Laravel's built-in authentication services and Laravel Sanctum.
108+
And, if you would like to get started quickly, we are pleased to recommend [our application starter kits](/docs/{{version}}/starter-kits) as a quick way to start a new Laravel application that already uses our preferred authentication stack of Laravel's built-in authentication services.
117109

118110
<a name="authentication-quickstart"></a>
119111
## Authentication Quickstart
@@ -124,16 +116,12 @@ And, if you would like to get started quickly, we are pleased to recommend [Lara
124116
<a name="install-a-starter-kit"></a>
125117
### Install a Starter Kit
126118

127-
First, you should [install a Laravel application starter kit](/docs/{{version}}/starter-kits). Our current starter kits, Laravel Breeze and Laravel Jetstream, offer beautifully designed starting points for incorporating authentication into your fresh Laravel application.
128-
129-
Laravel Breeze is a minimal, simple implementation of all of Laravel's authentication features, including login, registration, password reset, email verification, and password confirmation. Laravel Breeze's view layer is made up of simple [Blade templates](/docs/{{version}}/blade) styled with [Tailwind CSS](https://tailwindcss.com). Additionally, Breeze provides scaffolding options based on [Livewire](https://livewire.laravel.com) or [Inertia](https://inertiajs.com), with the choice of using Vue or React for the Inertia-based scaffolding.
130-
131-
[Laravel Jetstream](https://jetstream.laravel.com) is a more robust application starter kit that includes support for scaffolding your application with [Livewire](https://livewire.laravel.com) or [Inertia and Vue](https://inertiajs.com). In addition, Jetstream features optional support for two-factor authentication, teams, profile management, browser session management, API support via [Laravel Sanctum](/docs/{{version}}/sanctum), account deletion, and more.
119+
First, you should [install a Laravel application starter kit](/docs/{{version}}/starter-kits). Our starter kits offer beautifully designed starting points for incorporating authentication into your fresh Laravel application.
132120

133121
<a name="retrieving-the-authenticated-user"></a>
134122
### Retrieving the Authenticated User
135123

136-
After installing an authentication starter kit and allowing users to register and authenticate with your application, you will often need to interact with the currently authenticated user. While handling an incoming request, you may access the authenticated user via the `Auth` facade's `user` method:
124+
After creating an application from a starter kit and allowing users to register and authenticate with your application, you will often need to interact with the currently authenticated user. While handling an incoming request, you may access the authenticated user via the `Auth` facade's `user` method:
137125

138126
```php
139127
use Illuminate\Support\Facades\Auth;
@@ -228,7 +216,7 @@ Route::get('/flights', function () {
228216
<a name="login-throttling"></a>
229217
### Login Throttling
230218

231-
If you are using the Laravel Breeze or Laravel Jetstream [starter kits](/docs/{{version}}/starter-kits), rate limiting will automatically be applied to login attempts. By default, the user will not be able to login for one minute if they fail to provide the correct credentials after several attempts. The throttling is unique to the user's username / email address and their IP address.
219+
If you are using one of our [application starter kits](/docs/{{version}}/starter-kits), rate limiting will automatically be applied to login attempts. By default, the user will not be able to login for one minute if they fail to provide the correct credentials after several attempts. The throttling is unique to the user's username / email address and their IP address.
232220

233221
> [!NOTE]
234222
> If you would like to rate limit other routes in your application, check out the [rate limiting documentation](/docs/{{version}}/routing#rate-limiting).

cache.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ If needed, you may set the `host` option to a UNIX socket path. If you do this,
8383
<a name="redis"></a>
8484
#### Redis
8585

86-
Before using a Redis cache with Laravel, you will need to either install the PhpRedis PHP extension via PECL or install the `predis/predis` package (~2.0) via Composer. [Laravel Sail](/docs/{{version}}/sail) already includes this extension. In addition, official Laravel deployment platforms such as [Laravel Forge](https://forge.laravel.com) and [Laravel Vapor](https://vapor.laravel.com) have the PhpRedis extension installed by default.
86+
Before using a Redis cache with Laravel, you will need to either install the PhpRedis PHP extension via PECL or install the `predis/predis` package (~2.0) via Composer. [Laravel Sail](/docs/{{version}}/sail) already includes this extension. In addition, official Laravel application platforms such as [Laravel Cloud](https://cloud.laravel.com) and [Laravel Forge](https://forge.laravel.com) have the PhpRedis extension installed by default.
8787

8888
For more information on configuring Redis, consult its [Laravel documentation page](/docs/{{version}}/redis#configuration).
8989

@@ -362,7 +362,7 @@ cache()->remember('users', $seconds, function () {
362362
<a name="managing-locks"></a>
363363
### Managing Locks
364364

365-
Atomic locks allow for the manipulation of distributed locks without worrying about race conditions. For example, [Laravel Forge](https://forge.laravel.com) uses atomic locks to ensure that only one remote task is being executed on a server at a time. You may create and manage locks using the `Cache::lock` method:
365+
Atomic locks allow for the manipulation of distributed locks without worrying about race conditions. For example, [Laravel Cloud](https://cloud.laravel.com) uses atomic locks to ensure that only one remote task is being executed on a server at a time. You may create and manage locks using the `Cache::lock` method:
366366

367367
```php
368368
use Illuminate\Support\Facades\Cache;

configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,4 +371,4 @@ While your application is in maintenance mode, no [queued jobs](/docs/{{version}
371371
<a name="alternatives-to-maintenance-mode"></a>
372372
#### Alternatives to Maintenance Mode
373373

374-
Since maintenance mode requires your application to have several seconds of downtime, consider alternatives like [Laravel Vapor](https://vapor.laravel.com) and [Envoyer](https://envoyer.io) to accomplish zero-downtime deployment with Laravel.
374+
Since maintenance mode requires your application to have several seconds of downtime, consider running your applications on a fully-managed platform like [Laravel Cloud](https://cloud.laravel.com) to accomplish zero-downtime deployment with Laravel.

container.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,15 @@ $this->app->bindIf(Transistor::class, function (Application $app) {
144144
});
145145
```
146146

147-
> [!NOTE]
147+
For convenience, you may omit providing the class or interface name that you wish to register as a separate argument and instead allow Laravel to infer the type from the return type of the closure you provide to the `bind` method:
148+
149+
```php
150+
App::bind(function (Application $app): Transistor {
151+
return new Transistor($app->make(PodcastParser::class));
152+
});
153+
```
154+
155+
> [!NOTE]
148156
> There is no need to bind classes into the container if they do not depend on any interfaces. The container does not need to be instructed on how to build these objects, since it can automatically resolve these objects using reflection.
149157
150158
<a name="binding-a-singleton"></a>

contributions.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ The Laravel source code is managed on GitHub, and there are repositories for eac
2828

2929
- [Laravel Application](https://github.com/laravel/laravel)
3030
- [Laravel Art](https://github.com/laravel/art)
31-
- [Laravel Breeze](https://github.com/laravel/breeze)
3231
- [Laravel Documentation](https://github.com/laravel/docs)
3332
- [Laravel Dusk](https://github.com/laravel/dusk)
3433
- [Laravel Cashier Stripe](https://github.com/laravel/cashier)
@@ -39,17 +38,19 @@ The Laravel source code is managed on GitHub, and there are repositories for eac
3938
- [Laravel Framework](https://github.com/laravel/framework)
4039
- [Laravel Homestead](https://github.com/laravel/homestead) ([Build Scripts](https://github.com/laravel/settler))
4140
- [Laravel Horizon](https://github.com/laravel/horizon)
42-
- [Laravel Jetstream](https://github.com/laravel/jetstream)
41+
- [Laravel Livewire Starter Kit](https://github.com/laravel/livewire-starter-kit)
4342
- [Laravel Passport](https://github.com/laravel/passport)
4443
- [Laravel Pennant](https://github.com/laravel/pennant)
4544
- [Laravel Pint](https://github.com/laravel/pint)
4645
- [Laravel Prompts](https://github.com/laravel/prompts)
46+
- [Laravel React Starter Kit](https://github.com/laravel/react-starter-kit)
4747
- [Laravel Reverb](https://github.com/laravel/reverb)
4848
- [Laravel Sail](https://github.com/laravel/sail)
4949
- [Laravel Sanctum](https://github.com/laravel/sanctum)
5050
- [Laravel Scout](https://github.com/laravel/scout)
5151
- [Laravel Socialite](https://github.com/laravel/socialite)
5252
- [Laravel Telescope](https://github.com/laravel/telescope)
53+
- [Laravel Vue Starter Kit](https://github.com/laravel/vue-starter-kit)
5354
- [Laravel Website](https://github.com/laravel/laravel.com)
5455

5556
</div>

deployment.md

+12-13
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- [Caching Views](#optimizing-view-loading)
1414
- [Debug Mode](#debug-mode)
1515
- [The Health Route](#the-health-route)
16-
- [Easy Deployment With Forge / Vapor](#deploying-with-forge-or-vapor)
16+
- [Deploying With Laravel Cloud or Forge](#deploying-with-cloud-or-forge)
1717

1818
<a name="introduction"></a>
1919
## Introduction
@@ -50,7 +50,7 @@ The Laravel framework has a few system requirements. You should ensure that your
5050
<a name="nginx"></a>
5151
### Nginx
5252

53-
If you are deploying your application to a server that is running Nginx, you may use the following configuration file as a starting point for configuring your web server. Most likely, this file will need to be customized depending on your server's configuration. **If you would like assistance in managing your server, consider using a first-party Laravel server management and deployment service such as [Laravel Forge](https://forge.laravel.com).**
53+
If you are deploying your application to a server that is running Nginx, you may use the following configuration file as a starting point for configuring your web server. Most likely, this file will need to be customized depending on your server's configuration. **If you would like assistance in managing your server, consider using a fully-managed Laravel platform like [Laravel Cloud](https://cloud.laravel.com).**
5454

5555
Please ensure, like the configuration below, your web server directs all requests to your application's `public/index.php` file. You should never attempt to move the `index.php` file to your project's root, as serving the application from the project root will expose many sensitive configuration files to the public Internet:
5656

@@ -194,20 +194,19 @@ By default, the health check route is served at `/up` and will return a 200 HTTP
194194

195195
When HTTP requests are made to this route, Laravel will also dispatch a `Illuminate\Foundation\Events\DiagnosingHealth` event, allowing you to perform additional health checks relevant to your application. Within a [listener](/docs/{{version}}/events) for this event, you may check your application's database or cache status. If you detect a problem with your application, you may simply throw an exception from the listener.
196196

197-
<a name="deploying-with-forge-or-vapor"></a>
198-
## Easy Deployment With Forge / Vapor
197+
<a name="deploying-with-cloud-or-forge"></a>
198+
## Deploying With Laravel Cloud or Forge
199199

200-
<a name="laravel-forge"></a>
201-
#### Laravel Forge
200+
<a name="laravel-cloud"></a>
201+
#### Laravel Cloud
202202

203-
If you aren't quite ready to manage your own server configuration or aren't comfortable configuring all of the various services needed to run a robust Laravel application, [Laravel Forge](https://forge.laravel.com) is a wonderful alternative.
203+
If you would like a fully-managed, auto-scaling deployment platform tuned for Laravel, check out [Laravel Cloud](https://cloud.laravel.com). Laravel Cloud is a robust deployment platform for Laravel, offering managed compute, databases, caches, and object storage.
204204

205-
Laravel Forge can create servers on various infrastructure providers such as DigitalOcean, Linode, AWS, and more. In addition, Forge installs and manages all of the tools needed to build robust Laravel applications, such as Nginx, MySQL, Redis, Memcached, Beanstalk, and more.
205+
Launch your Laravel application on Cloud and fall in love with the scalable simplicity. Laravel Cloud is fine-tuned by Laravel's creators to work seamlessly with the framework so you can keep writing your Laravel applications exactly like you're used to.
206206

207-
> [!NOTE]
208-
> Want a full guide to deploying with Laravel Forge? Check out the [Laravel Bootcamp](https://bootcamp.laravel.com/deploying) and the Forge [video series available on Laracasts](https://laracasts.com/series/learn-laravel-forge-2022-edition).
207+
<a name="laravel-forge"></a>
208+
#### Laravel Forge
209209

210-
<a name="laravel-vapor"></a>
211-
#### Laravel Vapor
210+
If you prefer to manage your own servers but aren't comfortable configuring all of the various services needed to run a robust Laravel application, [Laravel Forge](https://forge.laravel.com) is a VPS server management platform for Laravel applications.
212211

213-
If you would like a totally serverless, auto-scaling deployment platform tuned for Laravel, check out [Laravel Vapor](https://vapor.laravel.com). Laravel Vapor is a serverless deployment platform for Laravel, powered by AWS. Launch your Laravel infrastructure on Vapor and fall in love with the scalable simplicity of serverless. Laravel Vapor is fine-tuned by Laravel's creators to work seamlessly with the framework so you can keep writing your Laravel applications exactly like you're used to.
212+
Laravel Forge can create servers on various infrastructure providers such as DigitalOcean, Linode, AWS, and more. In addition, Forge installs and manages all of the tools needed to build robust Laravel applications, such as Nginx, MySQL, Redis, Memcached, Beanstalk, and more.

0 commit comments

Comments
 (0)