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>
@@ -161,7 +161,7 @@ class SendEmails extends Command
161
161
}
162
162
```
163
163
164
-
> [!NOTE]
164
+
> [!NOTE]
165
165
> 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.
166
166
167
167
<aname="exit-codes"></a>
@@ -224,7 +224,7 @@ Artisan::command('mail:send {user}', function (string $user) {
224
224
<aname="isolatable-commands"></a>
225
225
### Isolatable Commands
226
226
227
-
> [!WARNING]
227
+
> [!WARNING]
228
228
> 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.
229
229
230
230
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:
@@ -499,7 +499,7 @@ return [
499
499
];
500
500
```
501
501
502
-
> [!NOTE]
502
+
> [!NOTE]
503
503
The comprehensive [Laravel Prompts](/docs/{{version}}/prompts) documentation includes additional information on the available prompts and their usage.
504
504
505
505
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:
@@ -560,7 +560,7 @@ $options = $this->options();
560
560
<aname="prompting-for-input"></a>
561
561
### Prompting for Input
562
562
563
-
> [!NOTE]
563
+
> [!NOTE]
564
564
> [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.
565
565
566
566
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:
@@ -734,7 +734,7 @@ foreach ($users as $user) {
734
734
$bar->finish();
735
735
```
736
736
737
-
> [!NOTE]
737
+
> [!NOTE]
738
738
> For more advanced options, check out the [Symfony Progress Bar component documentation](https://symfony.com/doc/7.0/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
@@ -40,7 +40,7 @@ Providers define how users are retrieved from your persistent storage. Laravel s
40
40
41
41
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.
42
42
43
-
> [!NOTE]
43
+
> [!NOTE]
44
44
> 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.
45
45
46
46
<aname="starter-kits"></a>
@@ -110,7 +110,7 @@ And, if you would like to get started quickly, we are pleased to recommend [our
110
110
<aname="authentication-quickstart"></a>
111
111
## Authentication Quickstart
112
112
113
-
> [!WARNING]
113
+
> [!WARNING]
114
114
> 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).
115
115
116
116
<aname="install-a-starter-kit"></a>
@@ -172,7 +172,7 @@ if (Auth::check()) {
172
172
}
173
173
```
174
174
175
-
> [!NOTE]
175
+
> [!NOTE]
176
176
> 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).
177
177
178
178
<aname="protecting-routes"></a>
@@ -218,7 +218,7 @@ Route::get('/flights', function () {
218
218
219
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.
220
220
221
-
> [!NOTE]
221
+
> [!NOTE]
222
222
> If you would like to rate limit other routes in your application, check out the [rate limiting documentation](/docs/{{version}}/routing#rate-limiting).
223
223
224
224
<aname="authenticating-users"></a>
@@ -295,7 +295,7 @@ if (Auth::attempt([
295
295
}
296
296
```
297
297
298
-
> [!WARNING]
298
+
> [!WARNING]
299
299
> 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.
300
300
301
301
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:
@@ -519,7 +519,7 @@ When the `logoutOtherDevices` method is invoked, the user's other sessions will
519
519
520
520
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.
521
521
522
-
> [!NOTE]
522
+
> [!NOTE]
523
523
> 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
+3-3
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ You do not need to choose between exclusively using gates or exclusively using p
39
39
<aname="writing-gates"></a>
40
40
### Writing Gates
41
41
42
-
> [!WARNING]
42
+
> [!WARNING]
43
43
> 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.
44
44
45
45
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\AppServiceProvider` 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.
@@ -377,7 +377,7 @@ You may continue to define additional methods on the policy as needed for the va
377
377
378
378
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.
379
379
380
-
> [!NOTE]
380
+
> [!NOTE]
381
381
> 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.
382
382
383
383
<aname="policy-responses"></a>
@@ -525,7 +525,7 @@ public function before(User $user, string $ability): bool|null
525
525
526
526
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.
527
527
528
-
> [!WARNING]
528
+
> [!WARNING]
529
529
> 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.
0 commit comments