You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: artisan.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ All Laravel applications include Tinker by default. However, you may install Tin
62
62
composer require laravel/tinker
63
63
```
64
64
65
-
> **Note**
65
+
> [!NOTE]
66
66
> Looking for hot reloading, multiline code editing, and autocompletion when interacting with your Laravel application? Check out [Tinkerwell](https://tinkerwell.app)!
67
67
68
68
<aname="usage"></a>
@@ -80,7 +80,7 @@ You can publish Tinker's configuration file using the `vendor:publish` command:
> 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.
85
85
86
86
<aname="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
155
155
}
156
156
}
157
157
158
-
> **Note**
158
+
> [!NOTE]
159
159
> 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.
160
160
161
161
<aname="closure-commands"></a>
@@ -203,7 +203,7 @@ When defining a closure based command, you may use the `purpose` method to add a
203
203
<aname="isolatable-commands"></a>
204
204
### Isolatable Commands
205
205
206
-
> **Warning**
206
+
> [!WARNING]
207
207
> 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.
208
208
209
209
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
448
448
),
449
449
];
450
450
451
-
> **Note**
451
+
> [!NOTE]
452
452
The comprehensive [Laravel Prompts](/docs/{{version}}/prompts) documentation includes additional information on the available prompts and their usage.
453
453
454
454
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.
505
505
<aname="prompting-for-input"></a>
506
506
### Prompting for Input
507
507
508
-
> **Note**
508
+
> [!NOTE]
509
509
> [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.
510
510
511
511
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.
648
648
649
649
$bar->finish();
650
650
651
-
> **Note**
651
+
> [!NOTE]
652
652
> For more advanced options, check out the [Symfony Progress Bar component documentation](https://symfony.com/doc/current/components/console/helpers/progressbar.html).
Copy file name to clipboardexpand all lines: authentication.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Providers define how users are retrieved from your persistent storage. Laravel s
39
39
40
40
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.
41
41
42
-
> **Note**
42
+
> [!NOTE]
43
43
> 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.
44
44
45
45
<aname="starter-kits"></a>
@@ -115,7 +115,7 @@ And, if you would like to get started quickly, we are pleased to recommend [Lara
115
115
<aname="authentication-quickstart"></a>
116
116
## Authentication Quickstart
117
117
118
-
> **Warning**
118
+
> [!WARNING]
119
119
> 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).
120
120
121
121
<aname="install-a-starter-kit"></a>
@@ -175,7 +175,7 @@ To determine if the user making the incoming HTTP request is authenticated, you
175
175
// The user is logged in...
176
176
}
177
177
178
-
> **Note**
178
+
> [!NOTE]
179
179
> 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).
180
180
181
181
<aname="protecting-routes"></a>
@@ -216,7 +216,7 @@ When attaching the `auth` middleware to a route, you may also specify which "gua
216
216
217
217
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.
218
218
219
-
> **Note**
219
+
> [!NOTE]
220
220
> If you would like to rate limit other routes in your application, check out the [rate limiting documentation](/docs/{{version}}/routing#rate-limiting).
221
221
222
222
<aname="authenticating-users"></a>
@@ -287,7 +287,7 @@ For complex query conditions, you may provide a closure in your array of credent
287
287
// Authentication was successful...
288
288
}
289
289
290
-
> **Warning**
290
+
> [!WARNING]
291
291
> 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.
292
292
293
293
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
479
479
480
480
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.
481
481
482
-
> **Note**
482
+
> [!NOTE]
483
483
> 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!
Copy file name to clipboardexpand all lines: authorization.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ You do not need to choose between exclusively using gates or exclusively using p
38
38
<aname="writing-gates"></a>
39
39
### Writing Gates
40
40
41
-
> **Warning**
41
+
> [!WARNING]
42
42
> 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.
43
43
44
44
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
327
327
// Return the name of the policy class for the given model...
328
328
});
329
329
330
-
> **Warning**
330
+
> [!WARNING]
331
331
> Any policies that are explicitly mapped in your `AuthServiceProvider` will take precedence over any potentially auto-discovered policies.
332
332
333
333
<aname="writing-policies"></a>
@@ -362,7 +362,7 @@ You may continue to define additional methods on the policy as needed for the va
362
362
363
363
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.
364
364
365
-
> **Note**
365
+
> [!NOTE]
366
366
> 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.
367
367
368
368
<aname="policy-responses"></a>
@@ -494,7 +494,7 @@ For certain users, you may wish to authorize all actions within a given policy.
494
494
495
495
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.
496
496
497
-
> **Warning**
497
+
> [!WARNING]
498
498
> 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.
499
499
500
500
<aname="authorizing-actions-using-policies"></a>
@@ -661,7 +661,7 @@ The following controller methods will be mapped to their corresponding policy me
661
661
662
662
</div>
663
663
664
-
> **Note**
664
+
> [!NOTE]
665
665
> 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`.
0 commit comments