Skip to content

Commit 46c2634

Browse files
authored
Adopt new note markup (#9248)
1 parent 66f7daf commit 46c2634

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+476
-477
lines changed

artisan.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ All Laravel applications include Tinker by default. However, you may install Tin
6262
composer require laravel/tinker
6363
```
6464

65-
> **Note**
65+
> [!NOTE]
6666
> Looking for hot reloading, multiline code editing, and autocompletion when interacting with your Laravel application? Check out [Tinkerwell](https://tinkerwell.app)!
6767
6868
<a name="usage"></a>
@@ -80,7 +80,7 @@ You can publish Tinker's configuration file using the `vendor:publish` command:
8080
php artisan vendor:publish --provider="Laravel\Tinker\TinkerServiceProvider"
8181
```
8282

83-
> **Warning**
83+
> [!WARNING]
8484
> The `dispatch` helper function and `dispatch` method on the `Dispatchable` class depends on garbage collection to place the job on the queue. Therefore, when using tinker, you should use `Bus::dispatch` or `Queue::push` to dispatch jobs.
8585
8686
<a name="command-allow-list"></a>
@@ -155,7 +155,7 @@ Let's take a look at an example command. Note that we are able to request any de
155155
}
156156
}
157157

158-
> **Note**
158+
> [!NOTE]
159159
> For greater code reuse, it is good practice to keep your console commands light and let them defer to application services to accomplish their tasks. In the example above, note that we inject a service class to do the "heavy lifting" of sending the e-mails.
160160
161161
<a name="closure-commands"></a>
@@ -203,7 +203,7 @@ When defining a closure based command, you may use the `purpose` method to add a
203203
<a name="isolatable-commands"></a>
204204
### Isolatable Commands
205205

206-
> **Warning**
206+
> [!WARNING]
207207
> To utilize this feature, your application must be using the `memcached`, `redis`, `dynamodb`, `database`, `file`, or `array` cache driver as your application's default cache driver. In addition, all servers must be communicating with the same central cache server.
208208
209209
Sometimes you may wish to ensure that only one instance of a command can run at a time. To accomplish this, you may implement the `Illuminate\Contracts\Console\Isolatable` interface on your command class:
@@ -448,7 +448,7 @@ If you would like complete control over the prompt, you may provide a closure th
448448
),
449449
];
450450

451-
> **Note**
451+
> [!NOTE]
452452
The comprehensive [Laravel Prompts](/docs/{{version}}/prompts) documentation includes additional information on the available prompts and their usage.
453453

454454
If you wish to prompt the user to select or enter [options](#options), you may include prompts in your command's `handle` method. However, if you only wish to prompt the user when they have also been automatically prompted for missing arguments, then you may implement the `afterPromptingForMissingArguments` method:
@@ -505,7 +505,7 @@ Options may be retrieved just as easily as arguments using the `option` method.
505505
<a name="prompting-for-input"></a>
506506
### Prompting for Input
507507

508-
> **Note**
508+
> [!NOTE]
509509
> [Laravel Prompts](/docs/{{version}}/prompts) is a PHP package for adding beautiful and user-friendly forms to your command-line applications, with browser-like features including placeholder text and validation.
510510
511511
In addition to displaying output, you may also ask the user to provide input during the execution of your command. The `ask` method will prompt the user with the given question, accept their input, and then return the user's input back to your command:
@@ -648,7 +648,7 @@ Sometimes, you may need more manual control over how a progress bar is advanced.
648648

649649
$bar->finish();
650650

651-
> **Note**
651+
> [!NOTE]
652652
> For more advanced options, check out the [Symfony Progress Bar component documentation](https://symfony.com/doc/current/components/console/helpers/progressbar.html).
653653
654654
<a name="registering-commands"></a>

authentication.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Providers define how users are retrieved from your persistent storage. Laravel s
3939

4040
Your application's authentication configuration file is located at `config/auth.php`. This file contains several well-documented options for tweaking the behavior of Laravel's authentication services.
4141

42-
> **Note**
42+
> [!NOTE]
4343
> Guards and providers should not be confused with "roles" and "permissions". To learn more about authorizing user actions via permissions, please refer to the [authorization](/docs/{{version}}/authorization) documentation.
4444
4545
<a name="starter-kits"></a>
@@ -115,7 +115,7 @@ And, if you would like to get started quickly, we are pleased to recommend [Lara
115115
<a name="authentication-quickstart"></a>
116116
## Authentication Quickstart
117117

118-
> **Warning**
118+
> [!WARNING]
119119
> This portion of the documentation discusses authenticating users via the [Laravel application starter kits](/docs/{{version}}/starter-kits), which includes UI scaffolding to help you get started quickly. If you would like to integrate with Laravel's authentication systems directly, check out the documentation on [manually authenticating users](#authenticating-users).
120120
121121
<a name="install-a-starter-kit"></a>
@@ -175,7 +175,7 @@ To determine if the user making the incoming HTTP request is authenticated, you
175175
// The user is logged in...
176176
}
177177

178-
> **Note**
178+
> [!NOTE]
179179
> Even though it is possible to determine if a user is authenticated using the `check` method, you will typically use a middleware to verify that the user is authenticated before allowing the user access to certain routes / controllers. To learn more about this, check out the documentation on [protecting routes](/docs/{{version}}/authentication#protecting-routes).
180180
181181
<a name="protecting-routes"></a>
@@ -216,7 +216,7 @@ When attaching the `auth` middleware to a route, you may also specify which "gua
216216

217217
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.
218218

219-
> **Note**
219+
> [!NOTE]
220220
> If you would like to rate limit other routes in your application, check out the [rate limiting documentation](/docs/{{version}}/routing#rate-limiting).
221221
222222
<a name="authenticating-users"></a>
@@ -287,7 +287,7 @@ For complex query conditions, you may provide a closure in your array of credent
287287
// Authentication was successful...
288288
}
289289

290-
> **Warning**
290+
> [!WARNING]
291291
> In these examples, `email` is not a required option, it is merely used as an example. You should use whatever column name corresponds to a "username" in your database table.
292292
293293
The `attemptWhen` method, which receives a closure as its second argument, may be used to perform more extensive inspection of the potential user before actually authenticating the user. The closure receives the potential user and should return `true` or `false` to indicate if the user may be authenticated:
@@ -479,7 +479,7 @@ When the `logoutOtherDevices` method is invoked, the user's other sessions will
479479

480480
While building your application, you may occasionally have actions that should require the user to confirm their password before the action is performed or before the user is redirected to a sensitive area of the application. Laravel includes built-in middleware to make this process a breeze. Implementing this feature will require you to define two routes: one route to display a view asking the user to confirm their password and another route to confirm that the password is valid and redirect the user to their intended destination.
481481

482-
> **Note**
482+
> [!NOTE]
483483
> The following documentation discusses how to integrate with Laravel's password confirmation features directly; however, if you would like to get started more quickly, the [Laravel application starter kits](/docs/{{version}}/starter-kits) include support for this feature!
484484
485485
<a name="password-confirmation-configuration"></a>

authorization.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You do not need to choose between exclusively using gates or exclusively using p
3838
<a name="writing-gates"></a>
3939
### Writing Gates
4040

41-
> **Warning**
41+
> [!WARNING]
4242
> Gates are a great way to learn the basics of Laravel's authorization features; however, when building robust Laravel applications you should consider using [policies](#creating-policies) to organize your authorization rules.
4343
4444
Gates are simply closures that determine if a user is authorized to perform a given action. Typically, gates are defined within the `boot` method of the `App\Providers\AuthServiceProvider` class using the `Gate` facade. Gates always receive a user instance as their first argument and may optionally receive additional arguments such as a relevant Eloquent model.
@@ -327,7 +327,7 @@ If you would like to define your own policy discovery logic, you may register a
327327
// Return the name of the policy class for the given model...
328328
});
329329

330-
> **Warning**
330+
> [!WARNING]
331331
> Any policies that are explicitly mapped in your `AuthServiceProvider` will take precedence over any potentially auto-discovered policies.
332332
333333
<a name="writing-policies"></a>
@@ -362,7 +362,7 @@ You may continue to define additional methods on the policy as needed for the va
362362

363363
If you used the `--model` option when generating your policy via the Artisan console, it will already contain methods for the `viewAny`, `view`, `create`, `update`, `delete`, `restore`, and `forceDelete` actions.
364364

365-
> **Note**
365+
> [!NOTE]
366366
> All policies are resolved via the Laravel [service container](/docs/{{version}}/container), allowing you to type-hint any needed dependencies in the policy's constructor to have them automatically injected.
367367
368368
<a name="policy-responses"></a>
@@ -494,7 +494,7 @@ For certain users, you may wish to authorize all actions within a given policy.
494494

495495
If you would like to deny all authorization checks for a particular type of user then you may return `false` from the `before` method. If `null` is returned, the authorization check will fall through to the policy method.
496496

497-
> **Warning**
497+
> [!WARNING]
498498
> The `before` method of a policy class will not be called if the class doesn't contain a method with a name matching the name of the ability being checked.
499499
500500
<a name="authorizing-actions-using-policies"></a>
@@ -661,7 +661,7 @@ The following controller methods will be mapped to their corresponding policy me
661661

662662
</div>
663663

664-
> **Note**
664+
> [!NOTE]
665665
> You may use the `make:policy` command with the `--model` option to quickly generate a policy class for a given model: `php artisan make:policy PostPolicy --model=Post`.
666666
667667
<a name="via-middleware"></a>

0 commit comments

Comments
 (0)