diff --git a/artisan.md b/artisan.md index 5f114362856..9887ef7d34f 100644 --- a/artisan.md +++ b/artisan.md @@ -204,6 +204,7 @@ In addition to receiving your command's arguments and options, command closures ```php use App\Models\User; use App\Support\DripEmailer; +use Illuminate\Support\Facades\Artisan; Artisan::command('mail:send {user}', function (DripEmailer $drip, string $user) { $drip->send(User::find($user)); @@ -658,7 +659,7 @@ $name = $this->choice( ### Writing Output -To send output to the console, you may use the `line`, `info`, `comment`, `question`, `warn`, and `error` methods. Each of these methods will use appropriate ANSI colors for their purpose. For example, let's display some general information to the user. Typically, the `info` method will display in the console as green colored text: +To send output to the console, you may use the `line`, `newLine`, `info`, `comment`, `question`, `warn`, `alert`, and `error` methods. Each of these methods will use appropriate ANSI colors for their purpose. For example, let's display some general information to the user. Typically, the `info` method will display in the console as green colored text: ```php /** @@ -772,6 +773,7 @@ Sometimes you may wish to execute an Artisan command outside of the CLI. For exa ```php use Illuminate\Support\Facades\Artisan; +use Illuminate\Support\Facades\Route; Route::post('/user/{user}/mail', function (string $user) { $exitCode = Artisan::call('mail:send', [ @@ -795,6 +797,7 @@ If your command defines an option that accepts an array, you may pass an array o ```php use Illuminate\Support\Facades\Artisan; +use Illuminate\Support\Facades\Route; Route::post('/mail', function () { $exitCode = Artisan::call('mail:send', [ @@ -821,6 +824,7 @@ Using the `queue` method on the `Artisan` facade, you may even queue Artisan com ```php use Illuminate\Support\Facades\Artisan; +use Illuminate\Support\Facades\Route; Route::post('/user/{user}/mail', function (string $user) { Artisan::queue('mail:send', [ diff --git a/authentication.md b/authentication.md index 3a5c7dd1ecf..7aa770e6517 100644 --- a/authentication.md +++ b/authentication.md @@ -55,7 +55,7 @@ Want to get started fast? Install a [Laravel application starter kit](/docs/{{ve By default, Laravel includes an `App\Models\User` [Eloquent model](/docs/{{version}}/eloquent) in your `app/Models` directory. This model may be used with the default Eloquent authentication driver. -If your application is not using Eloquent, you may use the `database` authentication provider which uses the Laravel query builder. If your application is using MongoDB, check out MongoDB's official [Laravel user authentication documentation](https://www.mongodb.com/docs/drivers/php/laravel-mongodb/current/user-authentication/) . +If your application is not using Eloquent, you may use the `database` authentication provider which uses the Laravel query builder. If your application is using MongoDB, check out MongoDB's official [Laravel user authentication documentation](https://www.mongodb.com/docs/drivers/php/laravel-mongodb/current/user-authentication/). When building the database schema for the `App\Models\User` model, make sure the password column is at least 60 characters in length. Of course, the `users` table migration that is included in new Laravel applications already creates a column that exceeds this length. @@ -433,7 +433,7 @@ Once the middleware has been attached to the route, you will automatically be pr #### A Note on FastCGI -If you are using PHP FastCGI and Apache to serve your Laravel application, HTTP Basic authentication may not work correctly. To correct these problems, the following lines may be added to your application's `.htaccess` file: +If you are using [PHP FastCGI](https://www.php.net/manual/en/install.fpm.php) and Apache to serve your Laravel application, HTTP Basic authentication may not work correctly. To correct these problems, the following lines may be added to your application's `.htaccess` file: ```apache RewriteCond %{HTTP:Authorization} ^(.+)$ diff --git a/billing.md b/billing.md index 6412d341063..d329f8873c4 100644 --- a/billing.md +++ b/billing.md @@ -1755,7 +1755,7 @@ This method will set the trial period ending date on the subscription record wit The `trialUntil` method allows you to provide a `DateTime` instance that specifies when the trial period should end: ```php -use Carbon\Carbon; +use Illuminate\Support\Carbon; $user->newSubscription('default', 'price_monthly') ->trialUntil(Carbon::now()->addDays(10)) diff --git a/blade.md b/blade.md index 0a901f57547..6579f3acf7f 100644 --- a/blade.md +++ b/blade.md @@ -161,7 +161,7 @@ Sometimes you may pass an array to your view with the intention of rendering it ``` -However, instead of manually calling `json_encode`, you may use the `Illuminate\Support\Js::from` method directive. The `from` method accepts the same arguments as PHP's `json_encode` function; however, it will ensure that the resulting JSON is properly escaped for inclusion within HTML quotes. The `from` method will return a string `JSON.parse` JavaScript statement that will convert the given object or array into a valid JavaScript object: +However, instead of manually calling `json_encode`, you may use the `Illuminate\Support\Js::from` method directive. The `from` method accepts the same arguments as PHP's `json_encode` function; however, it will ensure that the resulting JSON has been properly escaped for inclusion within HTML quotes. The `from` method will return a string `JSON.parse` JavaScript statement that will convert the given object or array into a valid JavaScript object: ```blade