Skip to content

Commit

Permalink
Grammarly corrections (#6809)
Browse files Browse the repository at this point in the history
* Grammarly corrections

* Add necessary commas
  • Loading branch information
u01jmg3 authored Feb 2, 2021
1 parent d5363d7 commit 534aaa9
Show file tree
Hide file tree
Showing 40 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion artisan.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Closure based commands provide an alternative to defining console commands as cl
require base_path('routes/console.php');
}

Even though this file does not define HTTP routes, it defines console based entry points (routes) into your application. Within this file, you may define all of your closure based console commands using the `Artisan::command` method. The `command` method accepts two arguments: the [command signature](#defining-input-expectations) and a closure which receives the commands arguments and options:
Even though this file does not define HTTP routes, it defines console based entry points (routes) into your application. Within this file, you may define all of your closure based console commands using the `Artisan::command` method. The `command` method accepts two arguments: the [command signature](#defining-input-expectations) and a closure which receives the command's arguments and options:

Artisan::command('mail:send {user}', function ($user) {
$this->info("Sending email to: {$user}!");
Expand Down
6 changes: 3 additions & 3 deletions billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ After a customer is subscribed to your application, they may occasionally want t

$user->subscription('default')->swap('price_id');

If the customer is on trial, the trial period will be maintained. Also, if a "quantity" exists for the subscription, that quantity will also be maintained.
If the customer is on trial, the trial period will be maintained. Additionally, if a "quantity" exists for the subscription, that quantity will also be maintained.

If you would like to swap plans and cancel any trial period the customer is currently on, you may invoke the `skipTrial` method:

Expand All @@ -662,7 +662,7 @@ By default, Stripe prorates charges when swapping between plans. The `noProrate`

For more information on subscription proration, consult the [Stripe documentation](https://stripe.com/docs/billing/subscriptions/prorations).

> {note} Executing the `noProrate` method before the `swapAndInvoice` method will have no affect on proration. An invoice will always be issued.
> {note} Executing the `noProrate` method before the `swapAndInvoice` method will have no effect on proration. An invoice will always be issued.
<a name="subscription-quantity"></a>
### Subscription Quantity
Expand Down Expand Up @@ -1129,7 +1129,7 @@ The `charge` method accepts an array as its third argument, allowing you to pass
'custom_option' => $value,
]);

You may also use the `charge` method without an underlying customer or user. To accomplish this, invoke the `charge` method on an new instance of your application's billable model:
You may also use the `charge` method without an underlying customer or user. To accomplish this, invoke the `charge` method on a new instance of your application's billable model:

use App\Models\User;

Expand Down
10 changes: 5 additions & 5 deletions blade.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ If you are in a nested loop, you may access the parent loop's `$loop` variable v
@foreach ($users as $user)
@foreach ($user->posts as $post)
@if ($loop->parent->first)
This is first iteration of the parent loop.
This is the first iteration of the parent loop.
@endif
@endforeach
@endforeach
Expand Down Expand Up @@ -804,10 +804,10 @@ The following HTML will be rendered by Blade:
<a name="component-methods"></a>
#### Component Methods

In addition to public variables being available to your component template, any public methods on the component may be invoked. For example, imagine a component that has a `isSelected` method:
In addition to public variables being available to your component template, any public methods on the component may be invoked. For example, imagine a component that has an `isSelected` method:

/**
* Determine if the given option is the current selected option.
* Determine if the given option is the currently selected option.
*
* @param string $option
* @return bool
Expand Down Expand Up @@ -888,7 +888,7 @@ All of the attributes that are not part of the component's constructor will auto
<a name="default-merged-attributes"></a>
#### Default / Merged Attributes

Sometimes you may need to specify default values for attributes or merge additional values into some of the component's attributes. To accomplish this, you may use the attribute bag's `merge` method. This method is particularly useful for defining a set a default CSS classes that should always be applied to a component:
Sometimes you may need to specify default values for attributes or merge additional values into some of the component's attributes. To accomplish this, you may use the attribute bag's `merge` method. This method is particularly useful for defining a set of default CSS classes that should always be applied to a component:

<div {{ $attributes->merge(['class' => 'alert alert-'.$type]) }}>
{{ $message }}
Expand All @@ -909,7 +909,7 @@ The final, rendered HTML of the component will appear like the following:
<a name="non-class-attribute-merging"></a>
#### Non-Class Attribute Merging

When merging attributes that are not `class` attributes, the values provided to the `merge` method will be considered the "default" values of attribute. However, unlike the `class` attribute, these attributes will not be merged with injected attribute values. Instead, they will be overwritten. For example, a `button` component's implementation may look like the following:
When merging attributes that are not `class` attributes, the values provided to the `merge` method will be considered the "default" values of the attribute. However, unlike the `class` attribute, these attributes will not be merged with injected attribute values. Instead, they will be overwritten. For example, a `button` component's implementation may look like the following:

<button {{ $attributes->merge(['type' => 'button']) }}>
{{ $slot }}
Expand Down
6 changes: 3 additions & 3 deletions cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Thankfully, Laravel provides an expressive, unified API for various cache backen
<a name="configuration"></a>
## Configuration

Your application's cache configuration file is located at `config/cache.php`. In this file you may specify which cache driver you would like to be used by default throughout your application. Laravel supports popular caching backends like [Memcached](https://memcached.org), [Redis](https://redis.io), [DynamoDB](https://aws.amazon.com/dynamodb), and relational databases out of the box. In addition, a file based cache driver is available, while `array` and "null" cache drivers provide convenient cache backends for your automated tests.
Your application's cache configuration file is located at `config/cache.php`. In this file, you may specify which cache driver you would like to be used by default throughout your application. Laravel supports popular caching backends like [Memcached](https://memcached.org), [Redis](https://redis.io), [DynamoDB](https://aws.amazon.com/dynamodb), and relational databases out of the box. In addition, a file based cache driver is available, while `array` and "null" cache drivers provide convenient cache backends for your automated tests.

The cache configuration file also contains various other options, which are documented within the file, so make sure to read over these options. By default, Laravel is configured to use the `file` cache driver, which stores the serialized, cached objects on the server's filesystem. For larger applications, it is recommended that you use a more robust driver such as Memcached or Redis. You may even configure multiple cache configurations for the same driver.

Expand Down Expand Up @@ -334,7 +334,7 @@ If the lock is not available at the moment you request it, you may instruct Lara
try {
$lock->block(5);

// Lock acquired after waiting maximum of 5 seconds...
// Lock acquired after waiting a maximum of 5 seconds...
} catch (LockTimeoutException $e) {
// Unable to acquire lock...
} finally {
Expand All @@ -344,7 +344,7 @@ If the lock is not available at the moment you request it, you may instruct Lara
The example above may be simplified by passing a closure to the `block` method. When a closure is passed to this method, Laravel will attempt to acquire the lock for the specified number of seconds and will automatically release the lock once the closure has been executed:

Cache::lock('foo', 10)->block(5, function () {
// Lock acquired after waiting maximum of 5 seconds...
// Lock acquired after waiting a maximum of 5 seconds...
});

<a name="managing-locks-across-processes"></a>
Expand Down
4 changes: 2 additions & 2 deletions cashier-paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ You may display the original listed prices (without coupon discounts) using the
</ul>
```

> {note} When using the prices API, Paddle only allows to apply coupons to one-time purchase products and not to subscription plans.
> {note} When using the prices API, Paddle only allows applying coupons to one-time purchase products and not to subscription plans.
<a name="customers"></a>
## Customers
Expand Down Expand Up @@ -649,7 +649,7 @@ After a user has subscribed to your application, they may occasionally want to c

$user->subscription('default')->swap($premium = 34567);

If the user is on a trial, the trial period will be maintained. Also, if a "quantity" exists for the subscription, that quantity will also be maintained.
If the user is on a trial, the trial period will be maintained. Additionally, if a "quantity" exists for the subscription, that quantity will also be maintained.

If you would like to swap plans and cancel any trial period the user is currently on, you may use the `skipTrial` method:

Expand Down
2 changes: 1 addition & 1 deletion console-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ You may test this command with the following test which utilizes the `expectsQue
<a name="confirmation-expectations"></a>
#### Confirmation Expectations

When writing a command which expects a confirmation in the form of a "yes" or "no" answer, you may utilize the `expectsConfirmation` method:
When writing a command which expects confirmation in the form of a "yes" or "no" answer, you may utilize the `expectsConfirmation` method:

$this->artisan('module:import')
->expectsConfirmation('Do you really wish to run this command?', 'no')
Expand Down
2 changes: 1 addition & 1 deletion database-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ You may provide a closure based state transformation if your state change requir
)
->create();

If you already have model instances that you would like to attached to the models you are creating, you may pass the model instances to the `hasAttached` method. In this example, the same three roles will be attached to all three users:
If you already have model instances that you would like to be attached to the models you are creating, you may pass the model instances to the `hasAttached` method. In this example, the same three roles will be attached to all three users:

$roles = Role::factory()->count(3)->create();

Expand Down
2 changes: 1 addition & 1 deletion database.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Almost every modern web application interacts with a database. Laravel makes int
<a name="configuration"></a>
### Configuration

The configuration for Laravel's database services is located in your application's `config/database.php` configuration file. In this file you may define all of your database connections, as well as specify which connection should be used by default. Most of the configuration options within this file are driven by the values of your application's environment variables. Examples for most of Laravel's supported database systems are provided in this file.
The configuration for Laravel's database services is located in your application's `config/database.php` configuration file. In this file, you may define all of your database connections, as well as specify which connection should be used by default. Most of the configuration options within this file are driven by the values of your application's environment variables. Examples for most of Laravel's supported database systems are provided in this file.

By default, Laravel's sample [environment configuration](/docs/{{version}}/configuration#environment-configuration) is ready to use with [Laravel Sail](/docs/{{version}}/sail), which is a Docker configuration for developing Laravel applications on your local machine. However, you are free to modify your database configuration as needed for your local database.

Expand Down
4 changes: 2 additions & 2 deletions dusk.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ The `press` method may be used to click a button element on the page. The first

$browser->press('Login');

When submitting forms, many application's disable the form's submission button after it are pressed and then re-enable the button when the form submission's HTTP request is complete. To press a button and wait for the button to be re-enabled, you may use the `pressAndWaitFor` method:
When submitting forms, many application's disable the form's submission button after it is pressed and then re-enable the button when the form submission's HTTP request is complete. To press a button and wait for the button to be re-enabled, you may use the `pressAndWaitFor` method:

// Press the button and wait a maximum of 5 seconds for it to be enabled...
$browser->pressAndWaitFor('Save');
Expand Down Expand Up @@ -1509,7 +1509,7 @@ Sometimes you may already be on a given page and need to "load" the page's selec
<a name="shorthand-selectors"></a>
### Shorthand Selectors

The `elements` method within page classes allow you to define quick, easy-to-remember shortcuts for any CSS selector on your page. For example, let's define a shortcut for the "email" input field of the application's login page:
The `elements` method within page classes allows you to define quick, easy-to-remember shortcuts for any CSS selector on your page. For example, let's define a shortcut for the "email" input field of the application's login page:

/**
* Get the element shortcuts for the page.
Expand Down
2 changes: 1 addition & 1 deletion eloquent-mutators.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<a name="introduction"></a>
## Introduction

Accessors, mutators, and attribute casting allows you to transform Eloquent attribute values when you retrieve or set them on model instances. For example, you may want to use the [Laravel encrypter](/docs/{{version}}/encryption) to encrypt a value while it is stored in the database, and then automatically decrypt the attribute when you access it on an Eloquent model. Or, you may want to convert a JSON string that is stored in your database to an array when it is accessed via your Eloquent model.
Accessors, mutators, and attribute casting allow you to transform Eloquent attribute values when you retrieve or set them on model instances. For example, you may want to use the [Laravel encrypter](/docs/{{version}}/encryption) to encrypt a value while it is stored in the database, and then automatically decrypt the attribute when you access it on an Eloquent model. Or, you may want to convert a JSON string that is stored in your database to an array when it is accessed via your Eloquent model.

<a name="accessors-and-mutators"></a>
## Accessors & Mutators
Expand Down
2 changes: 1 addition & 1 deletion eloquent-relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ As demonstrated in the example above, you are free to add additional constraints
->orWhere('votes', '>=', 100)
->get();

The example above will generate the following SQL. As you can see, the `or` clause instructs the query to return _any_ use with greater than 100 votes. The query is no longer constrained to a specific user:
The example above will generate the following SQL. As you can see, the `or` clause instructs the query to return _any_ user with greater than 100 votes. The query is no longer constrained to a specific user:

```sql
select *
Expand Down
4 changes: 2 additions & 2 deletions eloquent.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Since all of Laravel's collections implement PHP's iterable interfaces, you may

Your application may run out of memory if you attempt to load tens of thousands of Eloquent records via the `all` or `get` methods. Instead of using these methods, the `chunk` method may be used to process large numbers of models more efficiently.

The `chunk` method will retrieve a subset of Eloquent models, passing them to a closure for processing. Since only the current chunk of Eloquent models is retrieved at a time, the `chunk` method will provide significantly reduced memory usage when working with a large amount of models:
The `chunk` method will retrieve a subset of Eloquent models, passing them to a closure for processing. Since only the current chunk of Eloquent models is retrieved at a time, the `chunk` method will provide significantly reduced memory usage when working with a large number of models:

use App\Models\Flight;

Expand Down Expand Up @@ -1108,7 +1108,7 @@ To start listening to model events, define a `$dispatchesEvents` property on you

After defining and mapping your Eloquent events, you may use [event listeners](https://laravel.com/docs/{{version}}/events#defining-listeners) to handle the events.

> {note} When issuing a mass update or delete query via Eloquent, the `saved`, `updated`, `deleting`, and `deleted` model events will not be dispatched for the affected models. This is because the models are never actually retrieved when performing a mass updates or deletes.
> {note} When issuing a mass update or delete query via Eloquent, the `saved`, `updated`, `deleting`, and `deleted` model events will not be dispatched for the affected models. This is because the models are never actually retrieved when performing mass updates or deletes.
<a name="events-using-closures"></a>
### Using Closures
Expand Down
4 changes: 2 additions & 2 deletions events.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ If you would like to define the listener's queue at runtime, you may define a `v
<a name="conditionally-queueing-listeners"></a>
#### Conditionally Queueing Listeners

Sometimes, you may need to determine whether a listener should be queued based on some data that's only available at runtime. To accomplish this, a `shouldQueue` method may be added to a listener to determine whether the listener should be queued. If the `shouldQueue` method returns `false`, the listener will not be executed:
Sometimes, you may need to determine whether a listener should be queued based on some data that are only available at runtime. To accomplish this, a `shouldQueue` method may be added to a listener to determine whether the listener should be queued. If the `shouldQueue` method returns `false`, the listener will not be executed:

<?php

Expand Down Expand Up @@ -471,7 +471,7 @@ Sometimes your queued event listeners may fail. If queued listener exceeds the m
<a name="specifying-queued-listener-maximum-attempts"></a>
#### Specifying Queued Listener Maximum Attempts

If one of your queued listener is encountering an error, you likely do not want it to keep retrying indefinitely. Therefore, Laravel provides various ways to specify how many times or for how long a listener may be attempted.
If one of your queued listeners is encountering an error, you likely do not want it to keep retrying indefinitely. Therefore, Laravel provides various ways to specify how many times or for how long a listener may be attempted.

You may define `$tries` property on your listener class to specify how many times the listener may be attempted before it is considered to have failed:

Expand Down
2 changes: 1 addition & 1 deletion facades.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ The `Facade` base class makes use of the `__callStatic()` magic-method to defer
}
}

Notice that near the top of the file we are "importing" the `Cache` facade. This facade serves as a proxy to accessing the underlying implementation of the `Illuminate\Contracts\Cache\Factory` interface. Any calls we make using the facade will be passed to the underlying instance of Laravel's cache service.
Notice that near the top of the file we are "importing" the `Cache` facade. This facade serves as a proxy for accessing the underlying implementation of the `Illuminate\Contracts\Cache\Factory` interface. Any calls we make using the facade will be passed to the underlying instance of Laravel's cache service.

If we look at that `Illuminate\Support\Facades\Cache` class, you'll see that there is no static method `get`:

Expand Down
Loading

0 comments on commit 534aaa9

Please sign in to comment.