Skip to content

[12.x] Fix markdown formatting #10261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Route::get('/', function (ServerRequestInterface $request) {
});
```

> [!NOTE]
> [!NOTE]
> If you return a PSR-7 response instance from a route or controller, it will automatically be converted back to a Laravel response instance and be displayed by the framework.

<a name="input"></a>
Expand Down Expand Up @@ -456,7 +456,7 @@ $input = $request->except(['credit_card']);
$input = $request->except('credit_card');
```

> [!WARNING]
> [!WARNING]
> The `only` method returns all of the key / value pairs that you request; however, it will not return key / value pairs that are not present on the request.

<a name="input-presence"></a>
Expand Down Expand Up @@ -754,7 +754,7 @@ $path = $request->photo->storeAs('images', 'filename.jpg');
$path = $request->photo->storeAs('images', 'filename.jpg', 's3');
```

> [!NOTE]
> [!NOTE]
> For more information about file storage in Laravel, check out the complete [file storage documentation](/docs/{{version}}/filesystem).

<a name="configuring-trusted-proxies"></a>
Expand Down Expand Up @@ -786,7 +786,7 @@ In addition to configuring the trusted proxies, you may also configure the proxy
})
```

> [!NOTE]
> [!NOTE]
> If you are using AWS Elastic Load Balancing, the `headers` value should be `Request::HEADER_X_FORWARDED_AWS_ELB`. If your load balancer uses the standard `Forwarded` header from [RFC 7239](https://www.rfc-editor.org/rfc/rfc7239#section-4), the `headers` value should be `Request::HEADER_FORWARDED`. For more information on the constants that may be used in the `headers` value, check out Symfony's documentation on [trusting proxies](https://symfony.com/doc/7.0/deployment/proxies.html).

<a name="trusting-all-proxies"></a>
Expand Down
4 changes: 2 additions & 2 deletions responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Route::get('/', function () {
});
```

> [!NOTE]
> [!NOTE]
> Did you know you can also return [Eloquent collections](/docs/{{version}}/eloquent-collections) from your routes or controllers? They will automatically be converted to JSON. Give it a shot!

<a name="response-objects"></a>
Expand Down Expand Up @@ -345,7 +345,7 @@ return response()->download($pathToFile);
return response()->download($pathToFile, $name, $headers);
```

> [!WARNING]
> [!WARNING]
> Symfony HttpFoundation, which manages file downloads, requires the file being downloaded to have an ASCII filename.

<a name="file-responses"></a>
Expand Down
4 changes: 2 additions & 2 deletions reverb.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Connection activity is recorded by polling for new updates on a periodic basis.

Due to the long-running nature of WebSocket servers, you may need to make some optimizations to your server and hosting environment to ensure your Reverb server can effectively handle the optimal number of connections for the resources available on your server.

> [!NOTE]
> [!NOTE]
> If your site is managed by [Laravel Forge](https://forge.laravel.com), you may automatically optimize your server for Reverb directly from the "Application" panel. By enabling the Reverb integration, Forge will ensure your server is production-ready, including installing any required extensions and increasing the allowed number of connections.

<a name="open-files"></a>
Expand Down Expand Up @@ -259,7 +259,7 @@ server {
}
```

> [!WARNING]
> [!WARNING]
> Reverb listens for WebSocket connections at `/app` and handles API requests at `/apps`. You should ensure the web server handling Reverb requests can serve both of these URIs. If you are using [Laravel Forge](https://forge.laravel.com) to manage your servers, your Reverb server will be correctly configured by default.

Typically, web servers are configured to limit the number of allowed connections in order to prevent overloading the server. To increase the number of allowed connections on an Nginx web server to 10,000, the `worker_rlimit_nofile` and `worker_connections` values of the `nginx.conf` file should be updated:
Expand Down
16 changes: 8 additions & 8 deletions routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Route::any('/', function () {
});
```

> [!NOTE]
> [!NOTE]
> When defining multiple routes that share the same URI, routes using the `get`, `post`, `put`, `patch`, `delete`, and `options` methods should be defined before routes using the `any`, `match`, and `redirect` methods. This ensures the incoming request is matched with the correct route.

<a name="dependency-injection"></a>
Expand Down Expand Up @@ -158,7 +158,7 @@ Or, you may use the `Route::permanentRedirect` method to return a `301` status c
Route::permanentRedirect('/here', '/there');
```

> [!WARNING]
> [!WARNING]
> When using route parameters in redirect routes, the following parameters are reserved by Laravel and cannot be used: `destination` and `status`.

<a name="view-routes"></a>
Expand All @@ -172,7 +172,7 @@ Route::view('/welcome', 'welcome');
Route::view('/welcome', 'welcome', ['name' => 'Taylor']);
```

> [!WARNING]
> [!WARNING]
> When using route parameters in view routes, the following parameters are reserved by Laravel and cannot be used: `view`, `data`, `status`, and `headers`.

<a name="listing-your-routes"></a>
Expand Down Expand Up @@ -402,7 +402,7 @@ Route::get('/search/{search}', function (string $search) {
})->where('search', '.*');
```

> [!WARNING]
> [!WARNING]
> Encoded forward slashes are only supported within the last route segment.

<a name="named-routes"></a>
Expand All @@ -425,7 +425,7 @@ Route::get(
)->name('profile');
```

> [!WARNING]
> [!WARNING]
> Route names should always be unique.

<a name="generating-urls-to-named-routes"></a>
Expand Down Expand Up @@ -465,7 +465,7 @@ $url = route('profile', ['id' => 1, 'photos' => 'yes']);
// /user/1/profile?photos=yes
```

> [!NOTE]
> [!NOTE]
> Sometimes, you may wish to specify request-wide default values for URL parameters, such as the current locale. To accomplish this, you may use the [`URL::defaults` method](/docs/{{version}}/urls#default-values).

<a name="inspecting-the-current-route"></a>
Expand Down Expand Up @@ -544,7 +544,7 @@ Route::domain('{account}.example.com')->group(function () {
});
```

> [!WARNING]
> [!WARNING]
> In order to ensure your subdomain routes are reachable, you should register subdomain routes before registering root domain routes. This will prevent root domain routes from overwriting subdomain routes which have the same URI path.

<a name="route-group-prefixes"></a>
Expand Down Expand Up @@ -1023,7 +1023,7 @@ php artisan config:publish cors

This command will place a `cors.php` configuration file within your application's `config` directory.

> [!NOTE]
> [!NOTE]
> For more information on CORS and CORS headers, please consult the [MDN web documentation on CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers).

<a name="route-caching"></a>
Expand Down
8 changes: 4 additions & 4 deletions sail.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Finally, you may start Sail. To continue learning how to use Sail, please contin
./vendor/bin/sail up
```

> [!WARNING]
> [!WARNING]
> If you are using Docker Desktop for Linux, you should use the `default` Docker context by executing the following command: `docker context use default`.

<a name="adding-additional-services"></a>
Expand Down Expand Up @@ -300,7 +300,7 @@ AWS_URL=http://localhost:9000/local

You may create buckets via the MinIO console, which is available at `http://localhost:8900`. The default username for the MinIO console is `sail` while the default password is `password`.

> [!WARNING]
> [!WARNING]
> Generating temporary storage URLs via the `temporaryUrl` method is not supported when using MinIO.

<a name="running-tests"></a>
Expand Down Expand Up @@ -480,7 +480,7 @@ If you would like to choose the subdomain for your shared site, you may provide
sail share --subdomain=my-sail-site
```

> [!NOTE]
> [!NOTE]
> The `share` command is powered by [Expose](https://github.com/beyondcode/expose), an open source tunneling service by [BeyondCode](https://beyondco.de).

<a name="debugging-with-xdebug"></a>
Expand Down Expand Up @@ -551,7 +551,7 @@ To debug your application while interacting with the application via a web brows

If you're using PhpStorm, please review JetBrains' documentation regarding [zero-configuration debugging](https://www.jetbrains.com/help/phpstorm/zero-configuration-debugging.html).

> [!WARNING]
> [!WARNING]
> Laravel Sail relies on `artisan serve` to serve your application. The `artisan serve` command only accepts the `XDEBUG_CONFIG` and `XDEBUG_MODE` variables as of Laravel version 8.53.0. Older versions of Laravel (8.52.0 and below) do not support these variables and will not accept debug connections.

<a name="sail-customization"></a>
Expand Down
12 changes: 6 additions & 6 deletions sanctum.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ For this feature, Sanctum does not use tokens of any kind. Instead, Sanctum uses

Sanctum will only attempt to authenticate using cookies when the incoming request originates from your own SPA frontend. When Sanctum examines an incoming HTTP request, it will first check for an authentication cookie and, if none is present, Sanctum will then examine the `Authorization` header for a valid API token.

> [!NOTE]
> [!NOTE]
> It is perfectly fine to use Sanctum only for API token authentication or only for SPA authentication. Just because you use Sanctum does not mean you are required to use both features it offers.

<a name="installation"></a>
Expand Down Expand Up @@ -97,7 +97,7 @@ public function boot(): void
<a name="api-token-authentication"></a>
## API Token Authentication

> [!NOTE]
> [!NOTE]
> You should not use API tokens to authenticate your own first-party SPA. Instead, use Sanctum's built-in [SPA authentication features](#spa-authentication).

<a name="issuing-api-tokens"></a>
Expand Down Expand Up @@ -269,7 +269,7 @@ Sanctum also exists to provide a simple method of authenticating single page app

For this feature, Sanctum does not use tokens of any kind. Instead, Sanctum uses Laravel's built-in cookie based session authentication services. This approach to authentication provides the benefits of CSRF protection, session authentication, as well as protects against leakage of the authentication credentials via XSS.

> [!WARNING]
> [!WARNING]
> In order to authenticate, your SPA and API must share the same top-level domain. However, they may be placed on different subdomains. Additionally, you should ensure that you send the `Accept: application/json` header and either the `Referer` or `Origin` header with your request.

<a name="spa-configuration"></a>
Expand All @@ -280,7 +280,7 @@ For this feature, Sanctum does not use tokens of any kind. Instead, Sanctum uses

First, you should configure which domains your SPA will be making requests from. You may configure these domains using the `stateful` configuration option in your `sanctum` configuration file. This configuration setting determines which domains will maintain "stateful" authentication using Laravel session cookies when making requests to your API.

> [!WARNING]
> [!WARNING]
> If you are accessing your application via a URL that includes a port (`127.0.0.1:8000`), you should ensure that you include the port number with the domain.

<a name="sanctum-middleware"></a>
Expand Down Expand Up @@ -345,7 +345,7 @@ If the login request is successful, you will be authenticated and subsequent req

Of course, if your user's session expires due to lack of activity, subsequent requests to the Laravel application may receive a 401 or 419 HTTP error response. In this case, you should redirect the user to your SPA's login page.

> [!WARNING]
> [!WARNING]
> You are free to write your own `/login` endpoint; however, you should ensure that it authenticates the user using the standard, [session based authentication services that Laravel provides](/docs/{{version}}/authentication#authenticating-users). Typically, this means using the `web` authentication guard.

<a name="protecting-spa-routes"></a>
Expand Down Expand Up @@ -444,7 +444,7 @@ Route::post('/sanctum/token', function (Request $request) {

When the mobile application uses the token to make an API request to your application, it should pass the token in the `Authorization` header as a `Bearer` token.

> [!NOTE]
> [!NOTE]
> When issuing tokens for a mobile application, you are also free to specify [token abilities](#token-abilities).

<a name="protecting-mobile-api-routes"></a>
Expand Down
10 changes: 5 additions & 5 deletions scheduling.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ If you are repeatedly assigning the same timezone to all of your scheduled tasks
'schedule_timezone' => 'America/Chicago',
```

> [!WARNING]
> [!WARNING]
> Remember that some timezones utilize daylight savings time. When daylight saving time changes occur, your scheduled task may run twice or even not run at all. For this reason, we recommend avoiding timezone scheduling when possible.

<a name="preventing-task-overlaps"></a>
Expand All @@ -346,7 +346,7 @@ Behind the scenes, the `withoutOverlapping` method utilizes your application's [
<a name="running-tasks-on-one-server"></a>
### Running Tasks on One Server

> [!WARNING]
> [!WARNING]
> To utilize this feature, your application must be using the `database`, `memcached`, `dynamodb`, or `redis` cache driver as your application's default cache driver. In addition, all servers must be communicating with the same central cache server.

If your application's scheduler is running on multiple servers, you may limit a scheduled job to only execute on a single server. For instance, assume you have a scheduled task that generates a new report every Friday night. If the task scheduler is running on three worker servers, the scheduled task will run on all three servers and generate the report three times. Not good!
Expand Down Expand Up @@ -401,7 +401,7 @@ Schedule::command('analytics:report')
->runInBackground();
```

> [!WARNING]
> [!WARNING]
> The `runInBackground` method may only be used when scheduling tasks via the `command` and `exec` methods.

<a name="maintenance-mode"></a>
Expand Down Expand Up @@ -526,7 +526,7 @@ Schedule::command('report:generate')
->emailOutputOnFailure('taylor@example.com');
```

> [!WARNING]
> [!WARNING]
> The `emailOutputTo`, `emailOutputOnFailure`, `sendOutputTo`, and `appendOutputTo` methods are exclusive to the `command` and `exec` methods.

<a name="task-hooks"></a>
Expand Down Expand Up @@ -602,7 +602,7 @@ The `pingBeforeIf`,`thenPingIf`,`pingOnSuccessIf`, and `pingOnFailureIf` methods
Schedule::command('emails:send')
->daily()
->pingBeforeIf($condition, $url)
->thenPingIf($condition, $url);
->thenPingIf($condition, $url);

Schedule::command('emails:send')
->daily()
Expand Down
4 changes: 2 additions & 2 deletions seeding.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

Laravel includes the ability to seed your database with data using seed classes. All seed classes are stored in the `database/seeders` directory. By default, a `DatabaseSeeder` class is defined for you. From this class, you may use the `call` method to run other seed classes, allowing you to control the seeding order.

> [!NOTE]
> [!NOTE]
> [Mass assignment protection](/docs/{{version}}/eloquent#mass-assignment) is automatically disabled during database seeding.

<a name="writing-seeders"></a>
Expand Down Expand Up @@ -54,7 +54,7 @@ class DatabaseSeeder extends Seeder
}
```

> [!NOTE]
> [!NOTE]
> You may type-hint any dependencies you need within the `run` method's signature. They will automatically be resolved via the Laravel [service container](/docs/{{version}}/container).

<a name="using-model-factories"></a>
Expand Down
8 changes: 4 additions & 4 deletions session.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The session `driver` configuration option defines where session data will be sto

</div>

> [!NOTE]
> [!NOTE]
> The array driver is primarily used during [testing](/docs/{{version}}/testing) and prevents the data stored in the session from being persisted.

<a name="driver-prerequisites"></a>
Expand All @@ -61,7 +61,7 @@ php artisan migrate

Before using Redis sessions with Laravel, you will need to either install the PhpRedis PHP extension via PECL or install the `predis/predis` package (~1.0) via Composer. For more information on configuring Redis, consult Laravel's [Redis documentation](/docs/{{version}}/redis#configuration).

> [!NOTE]
> [!NOTE]
> The `SESSION_CONNECTION` environment variable, or the `connection` option in the `session.php` configuration file, may be used to specify which Redis connection is used for session storage.

<a name="interacting-with-the-session"></a>
Expand Down Expand Up @@ -126,7 +126,7 @@ Route::get('/home', function () {
});
```

> [!NOTE]
> [!NOTE]
> There is little practical difference between using the session via an HTTP request instance versus using the global `session` helper. Both methods are [testable](/docs/{{version}}/testing) via the `assertSessionHas` method which is available in all of your test cases.

<a name="retrieving-all-session-data"></a>
Expand Down Expand Up @@ -280,7 +280,7 @@ $request->session()->invalidate();
<a name="session-blocking"></a>
## Session Blocking

> [!WARNING]
> [!WARNING]
> To utilize session blocking, your application must be using a cache driver that supports [atomic locks](/docs/{{version}}/cache#atomic-locks). Currently, those cache drivers include the `memcached`, `dynamodb`, `redis`, `mongodb` (included in the official `mongodb/laravel-mongodb` package), `database`, `file`, and `array` drivers. In addition, you may not use the `cookie` session driver.

By default, Laravel allows requests using the same session to execute concurrently. So, for example, if you use a JavaScript HTTP library to make two HTTP requests to your application, they will both execute at the same time. For many applications, this is not a problem; however, session data loss can occur in a small subset of applications that make concurrent requests to two different application endpoints which both write data to the session.
Expand Down
8 changes: 4 additions & 4 deletions socialite.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

In addition to typical, form based authentication, Laravel also provides a simple, convenient way to authenticate with OAuth providers using [Laravel Socialite](https://github.com/laravel/socialite). Socialite currently supports authentication via Facebook, X, LinkedIn, Google, GitHub, GitLab, Bitbucket, and Slack.

> [!NOTE]
> [!NOTE]
> Adapters for other platforms are available via the community driven [Socialite Providers](https://socialiteproviders.com/) website.

<a name="installation"></a>
Expand Down Expand Up @@ -49,7 +49,7 @@ These credentials should be placed in your application's `config/services.php` c
],
```

> [!NOTE]
> [!NOTE]
> If the `redirect` option contains a relative path, it will automatically be resolved to a fully qualified URL.

<a name="authentication"></a>
Expand Down Expand Up @@ -104,7 +104,7 @@ Route::get('/auth/callback', function () {
});
```

> [!NOTE]
> [!NOTE]
> For more information regarding what user information is available from specific OAuth providers, please consult the documentation on [retrieving user details](#retrieving-user-details).

<a name="access-scopes"></a>
Expand Down Expand Up @@ -172,7 +172,7 @@ return Socialite::driver('google')
->redirect();
```

> [!WARNING]
> [!WARNING]
> When using the `with` method, be careful not to pass any reserved keywords such as `state` or `response_type`.

<a name="retrieving-user-details"></a>
Expand Down
1 change: 0 additions & 1 deletion starter-kits.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,4 +386,3 @@ php artisan vendor:publish --tag=laravel-mail
```

This will generate several files in `resources/views/vendor/mail`. You can modify any of these files as well as the `resources/views/vendor/mail/themes/default.css` file to change the look and appearance of the default email template.

2 changes: 1 addition & 1 deletion structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ By default, the `app` directory contains the `Http`, `Models`, and `Providers` d

Both the `Console` and `Http` directories are further explained in their respective sections below, but think of the `Console` and `Http` directories as providing an API into the core of your application. The HTTP protocol and CLI are both mechanisms to interact with your application, but do not actually contain application logic. In other words, they are two ways of issuing commands to your application. The `Console` directory contains all of your Artisan commands, while the `Http` directory contains your controllers, middleware, and requests.

> [!NOTE]
> [!NOTE]
> Many of the classes in the `app` directory can be generated by Artisan via commands. To review the available commands, run the `php artisan list make` command in your terminal.

<a name="the-broadcasting-directory"></a>
Expand Down
2 changes: 1 addition & 1 deletion telescope.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected function gate(): void
}
```

> [!WARNING]
> [!WARNING]
> You should ensure you change your `APP_ENV` environment variable to `production` in your production environment. Otherwise, your Telescope installation will be publicly available.

<a name="upgrading-telescope"></a>
Expand Down
Loading