diff --git a/CHANGELOG.md b/CHANGELOG.md index f570e9b..70b79b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v1.6.1 - 2022-11-18 + +- docs update + ## v1.6.0 - 2022-11-01 - docs update diff --git a/assets/docs/html/9.x/billing.html b/assets/docs/html/9.x/billing.html index ca37816..d4a80d4 100644 --- a/assets/docs/html/9.x/billing.html +++ b/assets/docs/html/9.x/billing.html @@ -722,7 +722,7 @@
If you would like the subscription to still be considered active when it's in a past_due
state, you may use the keepPastDueSubscriptionsActive
method provided by Cashier. Typically, this method should be called in the register
method of your App\Providers\AppServiceProvider
:
If you would like the subscription to still be considered active when it's in a past_due
or incomplete
state, you may use the keepPastDueSubscriptionsActive
and keepIncompleteSubscriptionsActive
methods provided by Cashier. Typically, these methods should be called in the register
method of your App\Providers\AppServiceProvider
:
use Laravel\Cashier\Cashier;
/**
@@ -733,6 +733,7 @@ Incomplete and Past Due Status
public function register()
{
Cashier::keepPastDueSubscriptionsActive();
+ Cashier::keepIncompleteSubscriptionsActive();
}
diff --git a/assets/docs/html/9.x/blade.html b/assets/docs/html/9.x/blade.html index 9deadcf..7f12cd2 100644 --- a/assets/docs/html/9.x/blade.html +++ b/assets/docs/html/9.x/blade.html @@ -51,6 +51,7 @@Blade Templates
Stacks Service Injection Rendering Inline Blade Templates +Rendering Blade Fragments Extending Blade
- Custom Echo Handlers
- Custom If Statements
@@ -1291,6 +1292,20 @@Rendering Inline Blade Templates
deleteCachedView: true ); + +Rendering Blade Fragments
+When using frontend frameworks such as Turbo and htmx, you may occasionally need to only return a portion of a Blade template within your HTTP response. Blade "fragments" allow you to do just that. To get started, place a portion of your Blade template within
+@fragment
and@endfragment
directives:+
@fragment('user-list') + <ul> + @foreach ($users as $user) + <li>{{ $user->name }}</li> + @endforeach + </ul> +@endfragment +
Then, when rendering the view that utilizes this template, you may invoke the
+fragment
method to specify that only the specified fragment should be included in the outgoing HTTP response:
return view('dashboard', ['users' => $users])->fragment('user-list'); +
Extending Blade
Blade allows you to define your own custom directives using the
diff --git a/assets/docs/html/9.x/container.html b/assets/docs/html/9.x/container.html index ed81997..53ea169 100644 --- a/assets/docs/html/9.x/container.html +++ b/assets/docs/html/9.x/container.html @@ -322,11 +322,13 @@directive
method. When the Blade compiler encounters the custom directive, it will call the provided callback with the expression that the directive contains.The
$transistor = $this->app->makeWith(Transistor::class, ['id' => 1]); -make
MethodIf you are outside of a service provider in a location of your code that does not have access to the
+$app
variable, you may use theApp
facade to resolve a class instance from the container:If you are outside of a service provider in a location of your code that does not have access to the
$app
variable, you may use theApp
facade or theapp
helper to resolve a class instance from the container:
use App\Services\Transistor; use Illuminate\Support\Facades\App; $transistor = App::make(Transistor::class); + +$transistor = app(Transistor::class);
If you would like to have the Laravel container instance itself injected into a class that is being resolved by the container, you may type-hint the
Illuminate\Container\Container
class on your class' constructor:-
use Illuminate\Container\Container; diff --git a/assets/docs/html/9.x/eloquent.html b/assets/docs/html/9.x/eloquent.html index cda679c..ed6f5e4 100644 --- a/assets/docs/html/9.x/eloquent.html +++ b/assets/docs/html/9.x/eloquent.html @@ -226,7 +226,7 @@
UUID & ULID Keys
return ['id', 'discount_code']; }If you wish, you may choose to utilize "ULIDs" instead of UUIDs. ULIDs are similar to UUIDs; however, they are only 26 characters in length. Like ordered UUIDs, ULIDs are lexicographically sortable for efficient database indexing. To utilize ULIDs, you should use the
+Illuminate\Database\Eloquent\Concerns\HasUlids
trait on your model:If you wish, you may choose to utilize "ULIDs" instead of UUIDs. ULIDs are similar to UUIDs; however, they are only 26 characters in length. Like ordered UUIDs, ULIDs are lexicographically sortable for efficient database indexing. To utilize ULIDs, you should use the
Illuminate\Database\Eloquent\Concerns\HasUlids
trait on your model. You should also ensure that the model has a ULID equivalent primary key column:
use Illuminate\Database\Eloquent\Concerns\HasUlids; use Illuminate\Database\Eloquent\Model; diff --git a/assets/docs/html/9.x/filesystem.html b/assets/docs/html/9.x/filesystem.html index b2c3a79..28ddce0 100644 --- a/assets/docs/html/9.x/filesystem.html +++ b/assets/docs/html/9.x/filesystem.html @@ -123,14 +123,20 @@
SFTP Driver Configuration
Scoped & Read-Only Filesystems
-You may create a path scoped instance of any existing filesystem disk by defining a disk that utilizes the
+scoped
driver. Scoped disks allow you to define a filesystem where all paths are automatically prefixed with a given path prefix. For example, you may create a disk which scopes your existings3
disk to a specific path prefix, and then every file operation using your scoped disk will utilize the specified prefix:Scoped disks allow you to define a filesystem where all paths are automatically prefixed with a given path prefix. Before creating a scoped filesystem disk, you will need to install an additional Flysystem package via the Composer package manager:
++composer require league/flysystem-path-prefixing "^3.0" +
You may create a path scoped instance of any existing filesystem disk by defining a disk that utilizes the
scoped
driver. For example, you may create a disk which scopes your existings3
disk to a specific path prefix, and then every file operation using your scoped disk will utilize the specified prefix:-
's3-videos' => [ 'driver' => 'scoped', 'disk' => 's3', 'prefix' => 'path/to/videos', ],
If you would like to specify that any filesystem disk should be "read-only", you may include the
+read-only
configuration option in the disk's configuration array:"Read-only" disks allow you to create filesystem disks that do not allow write operations. Before using the
+read-only
configuration option, you will need to install an additional Flysystem package via the Composer package manager:+composer require league/flysystem-read-only "^3.0" +
Next, you may include the
read-only
configuration option in one or more of your disk's configuration arrays:
's3-videos' => [ 'driver' => 's3', // ... diff --git a/assets/docs/html/9.x/helpers.html b/assets/docs/html/9.x/helpers.html index 55561e5..47259b5 100644 --- a/assets/docs/html/9.x/helpers.html +++ b/assets/docs/html/9.x/helpers.html @@ -4,6 +4,7 @@
Helpers
Available Methods Other Utilities @@ -3348,3 +3349,38 @@Benchmarking
To invoke a callback more than once, you may specify the number of iterations that the callback should be invoked as the second argument to the method. When executing a callback more than once, the
Benchmark
class will return the average amount of milliseconds it took to execute the callback across all iterations:+ +Benchmark::dd(fn () => User::count(), iterations: 10); // 0.5 ms
Lottery
+Laravel's lottery class may be used to execute callbacks based on a set of given odds. This can be particularly useful when you only want to execute code for a percentage of your incoming requests:
++use Illuminate\Support\Lottery; + +Lottery::odds(1, 20) + ->winner(fn () => $user->won()) + ->loser(fn () => $user->lost()) + ->choose(); +
You may combine Laravel's lottery class with other Laravel features. For example, you may wish to only report a small percentage of slow queries to your exception handler. And, since the lottery class is callable, we may pass an instance of the class into any method that accepts callables:
++ +use Carbon\CarbonInterval; +use Illuminate\Support\Facades\DB; +use Illuminate\Support\Lottery; + +DB::whenQueryingForLongerThan( + CarbonInterval::seconds(2), + Lottery::odds(1, 100)->winner(fn () => report('Querying > 2 seconds.')), +); +
Testing Lotteries
+Laravel provides some simple methods to allow you to easily test your application's lottery invocations:
+diff --git a/assets/docs/html/9.x/http-tests.html b/assets/docs/html/9.x/http-tests.html index 5fb4b56..9d6da64 100644 --- a/assets/docs/html/9.x/http-tests.html +++ b/assets/docs/html/9.x/http-tests.html @@ -590,6 +590,7 @@// Lottery will always win... +Lottery::alwaysWin(); + +// Lottery will always lose... +Lottery::alwaysLose(); + +// Lottery will win then lose, and finally return to normal behavior... +Lottery::fix([true, false]); + +// Lottery will return to normal behavior... +Lottery::determineResultsNormally(); +
Response Assertions
assertPlainCookie assertRedirect assertRedirectContains +assertRedirectToRoute assertRedirectToSignedRoute assertSee assertSeeInOrder @@ -851,6 +852,11 @@assertRedirectContains
Assert whether the response is redirecting to a URI that contains the given string:
+ +$response->assertRedirectContains($string);
assertRedirectToRoute
+Assert that the response is a redirect to the given named route:
+$response->assertRedirectToRoute($name = null, $parameters = []); +
assertRedirectToSignedRoute
Assert that the response is a redirect to the given signed route:
diff --git a/assets/docs/html/9.x/middleware.html b/assets/docs/html/9.x/middleware.html index dffacea..0a67ce4 100644 --- a/assets/docs/html/9.x/middleware.html +++ b/assets/docs/html/9.x/middleware.html @@ -203,6 +203,7 @@Sorting Middleware
* @var string[] */ protected $middlewarePriority = [ + \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class, \Illuminate\Cookie\Middleware\EncryptCookies::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, diff --git a/assets/docs/html/9.x/octane.html b/assets/docs/html/9.x/octane.html index 018ade7..9f4984d 100644 --- a/assets/docs/html/9.x/octane.html +++ b/assets/docs/html/9.x/octane.html @@ -351,6 +351,7 @@Concurrent Tasks
Concurrent tasks processed by Octane utilize Swoole's "task workers", and execute within an entirely different process than the incoming request. The amount of workers available to process concurrent tasks is determined by the
--task-workers
directive on theoctane:start
command:+php artisan octane:start --workers=4 --task-workers=6
When invoking the
concurrently
method, you should not provide more than 1024 tasks due to limitations imposed by Swoole's task system.Ticks & Intervals
diff --git a/assets/docs/html/9.x/queues.html b/assets/docs/html/9.x/queues.html index 578fc95..9b29797 100644 --- a/assets/docs/html/9.x/queues.html +++ b/assets/docs/html/9.x/queues.html @@ -1326,6 +1326,9 @@The
queue:work
Command+Note
To keep thequeue:work
process running permanently in the background, you should use a process monitor such as Supervisor to ensure that the queue worker does not stop running.You may include the
+-v
flag when invoking thequeue:work
command if you would like the processed job IDs to be included in the command's output:php artisan queue:work -v +
Remember, queue workers are long-lived processes and store the booted application state in memory. As a result, they will not notice changes in your code base after they have been started. So, during your deployment process, be sure to restart your queue workers. In addition, remember that any static state created or modified by your application will not be automatically reset between jobs.
Alternatively, you may run the
queue:listen
command. When using thequeue:listen
command, you don't have to manually restart the worker when you want to reload your updated code or reset the application state; however, this command is significantly less efficient than thequeue:work
command:php artisan queue:listen diff --git a/assets/docs/html/9.x/sail.html b/assets/docs/html/9.x/sail.html index 312dcdc..e4788a6 100644 --- a/assets/docs/html/9.x/sail.html +++ b/assets/docs/html/9.x/sail.html @@ -114,7 +114,7 @@
Installing C
You may install the application's dependencies by navigating to the application's directory and executing the following command. This command uses a small Docker container containing PHP and Composer to install the application's dependencies:
docker run --rm \ -u "$(id -u):$(id -g)" \ - -v $(pwd):/var/www/html \ + -v "$(pwd):/var/www/html" \ -w /var/www/html \ laravelsail/php81-composer:latest \ composer install --ignore-platform-reqs diff --git a/assets/docs/html/9.x/starter-kits.html b/assets/docs/html/9.x/starter-kits.html index f6bc958..73c13b9 100644 --- a/assets/docs/html/9.x/starter-kits.html +++ b/assets/docs/html/9.x/starter-kits.html @@ -16,7 +16,8 @@
Introduction
While you are welcome to use these starter kits, they are not required. You are free to build your own application from the ground up by simply installing a fresh copy of Laravel. Either way, we know you will build something great!
Laravel Breeze
-Laravel Breeze is a minimal, simple implementation of all of Laravel's authentication features, including login, registration, password reset, email verification, and password confirmation. Laravel Breeze's default view layer is made up of simple Blade templates styled with Tailwind CSS. Or, Breeze can scaffold your application using Vue or React and Inertia.
+Laravel Breeze is a minimal, simple implementation of all of Laravel's authentication features, including login, registration, password reset, email verification, and password confirmation. In addition, Breeze includes a simple "profile" page where the user may update their name, email address, and password.
+Laravel Breeze's default view layer is made up of simple Blade templates styled with Tailwind CSS. Or, Breeze can scaffold your application using Vue or React and Inertia.
Breeze provides a wonderful starting point for beginning a fresh Laravel application and is also a great choice for projects that plan to take their Blade templates to the next level with Laravel Livewire.
@@ -39,6 +40,11 @@Breeze & Blade
npm run devNext, you may navigate to your application's
+ +/login
or/register
URLs in your web browser. All of Breeze's routes are defined within theroutes/auth.php
file.Dark Mode
+If you would like Breeze to include "dark mode" support when scaffolding your application's frontend, simply provide the
+--dark
directive when executing thebreeze:install
command:php artisan breeze:install --dark +
diff --git a/assets/docs/html/9.x/valet.html b/assets/docs/html/9.x/valet.html index 940492c..0606a1c 100644 --- a/assets/docs/html/9.x/valet.html +++ b/assets/docs/html/9.x/valet.html @@ -49,7 +49,7 @@Note
To learn more about compiling your application's CSS and JavaScript, check out Laravel's Vite documentation.Introduction
Laravel Bedrock CakePHP 3 -Concrete5 +ConcreteCMS Contao Craft Drupal diff --git a/assets/docs/html/9.x/validation.html b/assets/docs/html/9.x/validation.html index 505b8fb..025a8b3 100644 --- a/assets/docs/html/9.x/validation.html +++ b/assets/docs/html/9.x/validation.html @@ -716,6 +716,7 @@Available Validation Rules
JSON Less Than Less Than Or Equal +Lowercase MAC Address Max Max Digits @@ -750,6 +751,7 @@Available Validation Rules
String Timezone Unique (Database) +Uppercase URL UUID @@ -1062,6 +1064,9 @@lt:field
lte:field
The field under validation must be less than or equal to the given field. The two fields must be of the same type. Strings, numerics, arrays, and files are evaluated using the same conventions as the
+ +size
rule.lowercase:field
+The field under validation must be lowercase.
mac_address
The field under validation must be a MAC address.
@@ -1279,6 +1284,9 @@unique:table,column
You may specify additional query conditions by customizing the query using the
where
method. For example, let's add a query condition that scopes the query to only search records that have anaccount_id
column value of1
:+ +'email' => Rule::unique('users')->where(fn ($query) => $query->where('account_id', 1))
uppercase:field
+The field under validation must be uppercase.
url
The field under validation must be a valid URL.
diff --git a/assets/docs/md/9.x/billing.md b/assets/docs/md/9.x/billing.md index 481c645..d79d7df 100644 --- a/assets/docs/md/9.x/billing.md +++ b/assets/docs/md/9.x/billing.md @@ -867,7 +867,7 @@ When a subscription has an incomplete payment, you should direct the user to Cas ``` -If you would like the subscription to still be considered active when it's in a `past_due` state, you may use the `keepPastDueSubscriptionsActive` method provided by Cashier. Typically, this method should be called in the `register` method of your `App\Providers\AppServiceProvider`: +If you would like the subscription to still be considered active when it's in a `past_due` or `incomplete` state, you may use the `keepPastDueSubscriptionsActive` and `keepIncompleteSubscriptionsActive` methods provided by Cashier. Typically, these methods should be called in the `register` method of your `App\Providers\AppServiceProvider`: use Laravel\Cashier\Cashier; @@ -879,6 +879,7 @@ If you would like the subscription to still be considered active when it's in a public function register() { Cashier::keepPastDueSubscriptionsActive(); + Cashier::keepIncompleteSubscriptionsActive(); } > **Warning** diff --git a/assets/docs/md/9.x/blade.md b/assets/docs/md/9.x/blade.md index 419403f..713ea5a 100644 --- a/assets/docs/md/9.x/blade.md +++ b/assets/docs/md/9.x/blade.md @@ -39,6 +39,7 @@ - [Stacks](#stacks) - [Service Injection](#service-injection) - [Rendering Inline Blade Templates](#rendering-inline-blade-templates) +- [Rendering Blade Fragments](#rendering-blade-fragments) - [Extending Blade](#extending-blade) - [Custom Echo Handlers](#custom-echo-handlers) - [Custom If Statements](#custom-if-statements) @@ -1689,6 +1690,27 @@ return Blade::render( ); ``` + +## Rendering Blade Fragments + +When using frontend frameworks such as [Turbo](https://turbo.hotwired.dev/) and [htmx](https://htmx.org/), you may occasionally need to only return a portion of a Blade template within your HTTP response. Blade "fragments" allow you to do just that. To get started, place a portion of your Blade template within `@fragment` and `@endfragment` directives: + +```blade +@fragment('user-list') ++ @foreach ($users as $user) +
+@endfragment +``` + +Then, when rendering the view that utilizes this template, you may invoke the `fragment` method to specify that only the specified fragment should be included in the outgoing HTTP response: + +```php +return view('dashboard', ['users' => $users])->fragment('user-list'); +``` + ## Extending Blade diff --git a/assets/docs/md/9.x/container.md b/assets/docs/md/9.x/container.md index be397e8..aaac9d0 100644 --- a/assets/docs/md/9.x/container.md +++ b/assets/docs/md/9.x/container.md @@ -366,13 +366,15 @@ If some of your class' dependencies are not resolvable via the container, you ma $transistor = $this->app->makeWith(Transistor::class, ['id' => 1]); -If you are outside of a service provider in a location of your code that does not have access to the `$app` variable, you may use the `App` [facade](/docs/{{version}}/facades) to resolve a class instance from the container: +If you are outside of a service provider in a location of your code that does not have access to the `$app` variable, you may use the `App` [facade](/docs/{{version}}/facades) or the `app` [helper](/docs/{{version}}/helpers#method-app) to resolve a class instance from the container: use App\Services\Transistor; use Illuminate\Support\Facades\App; $transistor = App::make(Transistor::class); + $transistor = app(Transistor::class); + If you would like to have the Laravel container instance itself injected into a class that is being resolved by the container, you may type-hint the `Illuminate\Container\Container` class on your class' constructor: use Illuminate\Container\Container; diff --git a/assets/docs/md/9.x/eloquent.md b/assets/docs/md/9.x/eloquent.md index 4fec2b2..d2fa4d2 100644 --- a/assets/docs/md/9.x/eloquent.md +++ b/assets/docs/md/9.x/eloquent.md @@ -246,7 +246,7 @@ You can override the UUID generation process for a given model by defining a `ne return ['id', 'discount_code']; } -If you wish, you may choose to utilize "ULIDs" instead of UUIDs. ULIDs are similar to UUIDs; however, they are only 26 characters in length. Like ordered UUIDs, ULIDs are lexicographically sortable for efficient database indexing. To utilize ULIDs, you should use the `Illuminate\Database\Eloquent\Concerns\HasUlids` trait on your model: +If you wish, you may choose to utilize "ULIDs" instead of UUIDs. ULIDs are similar to UUIDs; however, they are only 26 characters in length. Like ordered UUIDs, ULIDs are lexicographically sortable for efficient database indexing. To utilize ULIDs, you should use the `Illuminate\Database\Eloquent\Concerns\HasUlids` trait on your model. You should also ensure that the model has a [ULID equivalent primary key column](/docs/{{version}}/migrations#column-method-ulid): use Illuminate\Database\Eloquent\Concerns\HasUlids; use Illuminate\Database\Eloquent\Model; diff --git a/assets/docs/md/9.x/filesystem.md b/assets/docs/md/9.x/filesystem.md index e6aee69..c82b29f 100644 --- a/assets/docs/md/9.x/filesystem.md +++ b/assets/docs/md/9.x/filesystem.md @@ -146,7 +146,13 @@ Laravel's Flysystem integrations work great with SFTP; however, a sample configu ### Scoped & Read-Only Filesystems -You may create a path scoped instance of any existing filesystem disk by defining a disk that utilizes the `scoped` driver. Scoped disks allow you to define a filesystem where all paths are automatically prefixed with a given path prefix. For example, you may create a disk which scopes your existing `s3` disk to a specific path prefix, and then every file operation using your scoped disk will utilize the specified prefix: +Scoped disks allow you to define a filesystem where all paths are automatically prefixed with a given path prefix. Before creating a scoped filesystem disk, you will need to install an additional Flysystem package via the Composer package manager: + +```shell +composer require league/flysystem-path-prefixing "^3.0" +``` + +You may create a path scoped instance of any existing filesystem disk by defining a disk that utilizes the `scoped` driver. For example, you may create a disk which scopes your existing `s3` disk to a specific path prefix, and then every file operation using your scoped disk will utilize the specified prefix: ```php 's3-videos' => [ @@ -156,7 +162,13 @@ You may create a path scoped instance of any existing filesystem disk by definin ], ``` -If you would like to specify that any filesystem disk should be "read-only", you may include the `read-only` configuration option in the disk's configuration array: +"Read-only" disks allow you to create filesystem disks that do not allow write operations. Before using the `read-only` configuration option, you will need to install an additional Flysystem package via the Composer package manager: + +```shell +composer require league/flysystem-read-only "^3.0" +``` + +Next, you may include the `read-only` configuration option in one or more of your disk's configuration arrays: ```php 's3-videos' => [ diff --git a/assets/docs/md/9.x/helpers.md b/assets/docs/md/9.x/helpers.md index c41350b..7a26c66 100644 --- a/assets/docs/md/9.x/helpers.md +++ b/assets/docs/md/9.x/helpers.md @@ -4,6 +4,7 @@ - [Available Methods](#available-methods) - [Other Utilities](#other-utilities) - [Benchmarking](#benchmarking) + - [Lottery](#lottery) ## Introduction @@ -3976,3 +3977,43 @@ By default, the given callbacks will be executed once (one iteration), and their To invoke a callback more than once, you may specify the number of iterations that the callback should be invoked as the second argument to the method. When executing a callback more than once, the `Benchmark` class will return the average amount of milliseconds it took to execute the callback across all iterations: Benchmark::dd(fn () => User::count(), iterations: 10); // 0.5 ms + + +### Lottery + +Laravel's lottery class may be used to execute callbacks based on a set of given odds. This can be particularly useful when you only want to execute code for a percentage of your incoming requests: + + use Illuminate\Support\Lottery; + + Lottery::odds(1, 20) + ->winner(fn () => $user->won()) + ->loser(fn () => $user->lost()) + ->choose(); + +You may combine Laravel's lottery class with other Laravel features. For example, you may wish to only report a small percentage of slow queries to your exception handler. And, since the lottery class is callable, we may pass an instance of the class into any method that accepts callables: + + use Carbon\CarbonInterval; + use Illuminate\Support\Facades\DB; + use Illuminate\Support\Lottery; + + DB::whenQueryingForLongerThan( + CarbonInterval::seconds(2), + Lottery::odds(1, 100)->winner(fn () => report('Querying > 2 seconds.')), + ); + + +#### Testing Lotteries + +Laravel provides some simple methods to allow you to easily test your application's lottery invocations: + + // Lottery will always win... + Lottery::alwaysWin(); + + // Lottery will always lose... + Lottery::alwaysLose(); + + // Lottery will win then lose, and finally return to normal behavior... + Lottery::fix([true, false]); + + // Lottery will return to normal behavior... + Lottery::determineResultsNormally(); diff --git a/assets/docs/md/9.x/http-tests.md b/assets/docs/md/9.x/http-tests.md index 68c92c5..45298bc 100644 --- a/assets/docs/md/9.x/http-tests.md +++ b/assets/docs/md/9.x/http-tests.md @@ -651,6 +651,7 @@ Laravel's `Illuminate\Testing\TestResponse` class provides a variety of custom a [assertPlainCookie](#assert-plain-cookie) [assertRedirect](#assert-redirect) [assertRedirectContains](#assert-redirect-contains) +[assertRedirectToRoute](#assert-redirect-to-route) [assertRedirectToSignedRoute](#assert-redirect-to-signed-route) [assertSee](#assert-see) [assertSeeInOrder](#assert-see-in-order) @@ -993,6 +994,13 @@ Assert whether the response is redirecting to a URI that contains the given stri $response->assertRedirectContains($string); + +#### assertRedirectToRoute + +Assert that the response is a redirect to the given [named route](/docs/{{version}}/routing#named-routes): + + $response->assertRedirectToRoute($name = null, $parameters = []); + #### assertRedirectToSignedRoute diff --git a/assets/docs/md/9.x/middleware.md b/assets/docs/md/9.x/middleware.md index aa66de2..cf3c112 100644 --- a/assets/docs/md/9.x/middleware.md +++ b/assets/docs/md/9.x/middleware.md @@ -232,6 +232,7 @@ Rarely, you may need your middleware to execute in a specific order but not have * @var string[] */ protected $middlewarePriority = [ + \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class, \Illuminate\Cookie\Middleware\EncryptCookies::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, diff --git a/assets/docs/md/9.x/octane.md b/assets/docs/md/9.x/octane.md index b4fda1f..c4086d8 100644 --- a/assets/docs/md/9.x/octane.md +++ b/assets/docs/md/9.x/octane.md @@ -479,6 +479,8 @@ Concurrent tasks processed by Octane utilize Swoole's "task workers", and execut php artisan octane:start --workers=4 --task-workers=6 ``` +When invoking the `concurrently` method, you should not provide more than 1024 tasks due to limitations imposed by Swoole's task system. + ## Ticks & Intervals diff --git a/assets/docs/md/9.x/queues.md b/assets/docs/md/9.x/queues.md index 2bb58aa..00ce866 100644 --- a/assets/docs/md/9.x/queues.md +++ b/assets/docs/md/9.x/queues.md @@ -1502,6 +1502,12 @@ php artisan queue:work > **Note** > To keep the `queue:work` process running permanently in the background, you should use a process monitor such as [Supervisor](#supervisor-configuration) to ensure that the queue worker does not stop running. +You may include the `-v` flag when invoking the `queue:work` command if you would like the processed job IDs to be included in the command's output: + +```shell +php artisan queue:work -v +``` + Remember, queue workers are long-lived processes and store the booted application state in memory. As a result, they will not notice changes in your code base after they have been started. So, during your deployment process, be sure to [restart your queue workers](#queue-workers-and-deployment). In addition, remember that any static state created or modified by your application will not be automatically reset between jobs. Alternatively, you may run the `queue:listen` command. When using the `queue:listen` command, you don't have to manually restart the worker when you want to reload your updated code or reset the application state; however, this command is significantly less efficient than the `queue:work` command: diff --git a/assets/docs/md/9.x/sail.md b/assets/docs/md/9.x/sail.md index cba44e2..4454d46 100644 --- a/assets/docs/md/9.x/sail.md +++ b/assets/docs/md/9.x/sail.md @@ -164,7 +164,7 @@ You may install the application's dependencies by navigating to the application' ```shell docker run --rm \ -u "$(id -u):$(id -g)" \ - -v $(pwd):/var/www/html \ + -v "$(pwd):/var/www/html" \ -w /var/www/html \ laravelsail/php81-composer:latest \ composer install --ignore-platform-reqs diff --git a/assets/docs/md/9.x/starter-kits.md b/assets/docs/md/9.x/starter-kits.md index 6428119..6501395 100644 --- a/assets/docs/md/9.x/starter-kits.md +++ b/assets/docs/md/9.x/starter-kits.md @@ -18,7 +18,9 @@ While you are welcome to use these starter kits, they are not required. You are ## Laravel Breeze -[Laravel Breeze](https://github.com/laravel/breeze) is a minimal, simple implementation of all of Laravel's [authentication features](/docs/{{version}}/authentication), including login, registration, password reset, email verification, and password confirmation. Laravel Breeze's default view layer is made up of simple [Blade templates](/docs/{{version}}/blade) styled with [Tailwind CSS](https://tailwindcss.com). Or, Breeze can scaffold your application using Vue or React and [Inertia](https://inertiajs.com). +[Laravel Breeze](https://github.com/laravel/breeze) is a minimal, simple implementation of all of Laravel's [authentication features](/docs/{{version}}/authentication), including login, registration, password reset, email verification, and password confirmation. In addition, Breeze includes a simple "profile" page where the user may update their name, email address, and password. + +Laravel Breeze's default view layer is made up of simple [Blade templates](/docs/{{version}}/blade) styled with [Tailwind CSS](https://tailwindcss.com). Or, Breeze can scaffold your application using Vue or React and [Inertia](https://inertiajs.com). Breeze provides a wonderful starting point for beginning a fresh Laravel application and is also a great choice for projects that plan to take their Blade templates to the next level with [Laravel Livewire](https://laravel-livewire.com). @@ -56,6 +58,15 @@ npm run dev Next, you may navigate to your application's `/login` or `/register` URLs in your web browser. All of Breeze's routes are defined within the `routes/auth.php` file. + +#### Dark Mode + +If you would like Breeze to include "dark mode" support when scaffolding your application's frontend, simply provide the `--dark` directive when executing the `breeze:install` command: + +```shell +php artisan breeze:install --dark +``` + > **Note** > To learn more about compiling your application's CSS and JavaScript, check out Laravel's [Vite documentation](/docs/{{version}}/vite#running-vite). diff --git a/assets/docs/md/9.x/valet.md b/assets/docs/md/9.x/valet.md index 0250baf..5e6ab9b 100644 --- a/assets/docs/md/9.x/valet.md +++ b/assets/docs/md/9.x/valet.md @@ -42,7 +42,7 @@ Out of the box, Valet support includes, but is not limited to: - [Laravel](https://laravel.com) - [Bedrock](https://roots.io/bedrock/) - [CakePHP 3](https://cakephp.org) -- [Concrete5](https://www.concrete5.org/) +- [ConcreteCMS](https://www.concretecms.com/) - [Contao](https://contao.org/en/) - [Craft](https://craftcms.com) - [Drupal](https://www.drupal.org/) diff --git a/assets/docs/md/9.x/validation.md b/assets/docs/md/9.x/validation.md index 00129ea..3cd6a62 100644 --- a/assets/docs/md/9.x/validation.md +++ b/assets/docs/md/9.x/validation.md @@ -846,6 +846,7 @@ Below is a list of all available validation rules and their function: [JSON](#rule-json) [Less Than](#rule-lt) [Less Than Or Equal](#rule-lte) +[Lowercase](#rule-lowercase) [MAC Address](#rule-mac) [Max](#rule-max) [Max Digits](#rule-max-digits) @@ -880,6 +881,7 @@ Below is a list of all available validation rules and their function: [String](#rule-string) [Timezone](#rule-timezone) [Unique (Database)](#rule-unique) +[Uppercase](#rule-uppercase) [URL](#rule-url) [UUID](#rule-uuid) @@ -1315,6 +1317,11 @@ The field under validation must be less than the given _field_. The two fields m The field under validation must be less than or equal to the given _field_. The two fields must be of the same type. Strings, numerics, arrays, and files are evaluated using the same conventions as the [`size`](#rule-size) rule. + +#### lowercase:_field_ + +The field under validation must be lowercase. + #### mac_address @@ -1618,6 +1625,11 @@ You may specify additional query conditions by customizing the query using the ` 'email' => Rule::unique('users')->where(fn ($query) => $query->where('account_id', 1)) + +#### uppercase:_field_ + +The field under validation must be uppercase. + #### url diff --git a/package.json b/package.json index 608806d..65c06c0 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "name": "Franlin Shera" }, "license": "GPL-3.0", - "version": "1.6.0", + "version": "1.6.1", "homepage": "https://github.com/franklinshera/laraveldocs-vscode", "bugs": "https://github.com/franklinshera/laraveldocs-vscode/issues", "repository": { diff --git a/src/Generator.ts b/src/Generator.ts index 6caf608..ef3ccb4 100644 --- a/src/Generator.ts +++ b/src/Generator.ts @@ -1,13 +1,12 @@ import * as fs from "fs"; import hljs from "highlight.js/lib/common"; import hljsBlade from "highlightjs-blade"; -hljs.registerLanguage("blade", hljsBlade); import * as path from "path"; - import { marked } from "marked"; import { getDocContents } from "./Utils"; import { HTML_DOCS, MD_DOCS } from "./constants"; +hljs.registerLanguage("blade", hljsBlade); export default class Generator { static baseDir = path.join(__dirname, ".."); diff --git a/src/extension.ts b/src/extension.ts index 332c5bb..f7744c1 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,9 +1,12 @@ import * as vscode from "vscode"; +import Generator from "./Generator"; import SidebarProvider from "./SidebarProvider"; export function activate(context: vscode.ExtensionContext) { const sidebarProvider = new SidebarProvider(context.extensionUri); + Generator.renderHtml(); + context.subscriptions.push( vscode.window.registerWebviewViewProvider("docs-list", sidebarProvider) );- {{ $user->name }}
+ @endforeach +