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: billing.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -195,7 +195,7 @@ For this feature to work properly, your customer's billing details, such as the
195
195
Cashier allows you to specify the log channel to be used when logging fatal Stripe errors. You may specify the log channel by defining the `CASHIER_LOGGER` environment variable within your application's `.env` file:
196
196
197
197
CASHIER_LOGGER=stack
198
-
198
+
199
199
Exceptions that are generated by API calls to Stripe will be logged through your application's default log channel.
200
200
201
201
<aname="using-custom-models"></a>
@@ -276,7 +276,7 @@ To credit a customer's balance, you may provide a negative value to the `applyBa
Providing a positive value to the `applyBalance` method will debit the customer's balance:
279
-
279
+
280
280
$user->applyBalance(300, 'Bad usage penalty.');
281
281
282
282
The `applyBalance` method will create new customer balance transactions for the customer. You may retrieve these transaction records using the `balanceTransactions` method, which may be useful in order to provide a log of credits and debits for the customer to review:
@@ -297,7 +297,7 @@ The `applyBalance` method will create new customer balance transactions for the
297
297
298
298
Cashier offers an easy way to manage a customer's tax IDs. For example, the `taxIds` method may be used to retrieve all of the [tax IDs](https://stripe.com/docs/api/customer_tax_ids/object) that are assigned to a customer as a collection:
299
299
300
-
$taxIds = $user->taxIds();
300
+
$taxIds = $user->taxIds();
301
301
302
302
You can also retrieve a specific tax ID for a customer by its identifier:
303
303
@@ -1201,7 +1201,7 @@ If you wish to cancel a subscription immediately, call the `cancelNow` method on
1201
1201
If you wish to cancel a subscription immediately and invoice any remaining un-invoiced metered usage or new / pending proration invoice items, call the `cancelNowAndInvoice` method on the user's subscription:
You may also choose to cancel the subscription at a specific moment in time:
1206
1206
1207
1207
$user->subscription('default')->cancelAt(
@@ -1850,7 +1850,7 @@ You may also use the `updateStripeSubscription` method to update a Stripe subscr
1850
1850
You may invoke the `stripe` method on the `Cashier` class if you would like to use the `Stripe\StripeClient` client directly. For example, you could use this method to access the `StripeClient` instance and retrieve a list of prices from your Stripe account:
Copy file name to clipboardExpand all lines: collections.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -2082,9 +2082,9 @@ You may also pass a key / value pair to the `sole` method, which will return the
2082
2082
['product' => 'Desk', 'price' => 200],
2083
2083
['product' => 'Chair', 'price' => 100],
2084
2084
]);
2085
-
2085
+
2086
2086
$collection->sole('product', 'Chair');
2087
-
2087
+
2088
2088
// ['product' => 'Chair', 'price' => 100]
2089
2089
2090
2090
Alternatively, you may also call the `sole` method with no argument to get the first element in the collection if there is only one element:
@@ -2094,10 +2094,10 @@ Alternatively, you may also call the `sole` method with no argument to get the f
2094
2094
]);
2095
2095
2096
2096
$collection->sole();
2097
-
2097
+
2098
2098
// ['product' => 'Desk', 'price' => 200]
2099
2099
2100
-
If there are no elements in the collection that should be returned by the `sole` method, an `\Illuminate\Collections\ItemNotFoundException` exception will be thrown. If there is more than one element that should be returned, an `\Illuminate\Collections\MultipleItemsFoundException` will be thrown.
2100
+
If there are no elements in the collection that should be returned by the `sole` method, an `\Illuminate\Collections\ItemNotFoundException` exception will be thrown. If there is more than one element that should be returned, an `\Illuminate\Collections\MultipleItemsFoundException` will be thrown.
Typically, the `$this->collection` property of a resource collection is automatically populated with the result of mapping each item of the collection to its singular resource class. The singular resource class is assumed to be the collection's class name without the trailing `Collection` portion of the class name. In addition, depending on your personal preference, the singular resource class may or may not be suffixed with `Resource`.
169
+
Typically, the `$this->collection` property of a resource collection is automatically populated with the result of mapping each item of the collection to its singular resource class. The singular resource class is assumed to be the collection's class name without the trailing `Collection` portion of the class name. In addition, depending on your personal preference, the singular resource class may or may not be suffixed with `Resource`.
170
170
171
171
For example, `UserCollection` will attempt to map the given user instances into the `UserResource` resource. To customize this behavior, you may override the `$collects` property of your resource collection:
Copy file name to clipboardExpand all lines: http-tests.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -864,7 +864,7 @@ Sometimes, JSON responses returned by your application may contain arrays of obj
864
864
"name":"Steve Schoger",
865
865
"age":55,
866
866
"location":"Earth"
867
-
},
867
+
},
868
868
{
869
869
"name":"Mary Schoger",
870
870
"age":60,
@@ -1132,7 +1132,7 @@ You may also assert that a given key has a particular validation error message.
1132
1132
Assert that the response view contains given a piece of data:
1133
1133
1134
1134
$response->assertViewHas($key, $value = null);
1135
-
1135
+
1136
1136
Passing a closure as the second argument to the `assertViewHas` method will allow you to inspect and make assertions against a particular piece of view data:
1137
1137
1138
1138
$response->assertViewHas('user', function (User $user) {
Copy file name to clipboardExpand all lines: octane.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@ Finally, build your Sail images:
131
131
Swoole supports a few additional configuration options that you may add to your `octane` configuration file if necessary. Because they rarely need to be modified, these options are not included in the default configuration file:
Copy file name to clipboardExpand all lines: rate-limiting.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,15 @@ The `Illuminate\Support\Facades\RateLimiter` facade may be used to interact with
30
30
The `attempt` method returns `false` when the callback has no remaining attempts available; otherwise, the `attempt` method will return the callback's result or `true`. The first argument accepted by the `attempt` method is a rate limiter "key", which may be any string of your choosing that represents the action being rate limited:
31
31
32
32
use Illuminate\Support\Facades\RateLimiter;
33
-
33
+
34
34
$executed = RateLimiter::attempt(
35
35
'send-message:'.$user->id,
36
36
$perMinute = 5,
37
37
function() {
38
38
// Send message...
39
39
}
40
40
);
41
-
41
+
42
42
if (! $executed) {
43
43
return 'Too many messages sent!';
44
44
}
@@ -49,15 +49,15 @@ The `attempt` method returns `false` when the callback has no remaining attempts
49
49
If you would like to manually interact with the rate limiter, a variety of other methods are available. For example, you may invoke the `tooManyAttempts` method to determine if a given rate limiter key has exceeded its maximum number of allowed attempts per minute:
50
50
51
51
use Illuminate\Support\Facades\RateLimiter;
52
-
52
+
53
53
if (RateLimiter::tooManyAttempts('send-message:'.$user->id, $perMinute = 5)) {
54
54
return 'Too many attempts!';
55
55
}
56
56
57
57
Alternatively, you may use the `remaining` method to retrieve the number of attempts remaining for a given key. If a given key has retries remaining, you may invoke the `hit` method to increment the number of total attempts:
58
58
59
59
use Illuminate\Support\Facades\RateLimiter;
60
-
60
+
61
61
if (RateLimiter::remaining('send-message:'.$user->id, $perMinute = 5)) {
62
62
RateLimiter::hit('send-message:'.$user->id);
63
63
@@ -94,8 +94,8 @@ You may reset the number of attempts for a given rate limiter key using the `cle
Copy file name to clipboardExpand all lines: scout.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -82,9 +82,9 @@ Then, set the `SCOUT_DRIVER` environment variable as well as your MeiliSearch `h
82
82
MEILISEARCH_HOST=http://127.0.0.1:7700
83
83
MEILISEARCH_KEY=masterKey
84
84
85
-
For more information regarding MeiliSearch, please consult the [MeiliSearch documentation](https://docs.meilisearch.com/learn/getting_started/quick_start.html).
85
+
For more information regarding MeiliSearch, please consult the [MeiliSearch documentation](https://docs.meilisearch.com/learn/getting_started/quick_start.html).
86
86
87
-
In addition, you should ensure that you install a version of `meilisearch/meilisearch-php` that is compatible with your MeiliSearch binary version by reviewing [MeiliSearch's documentation regarding binary compatibility](https://github.com/meilisearch/meilisearch-php#-compatibility-with-meilisearch).
87
+
In addition, you should ensure that you install a version of `meilisearch/meilisearch-php` that is compatible with your MeiliSearch binary version by reviewing [MeiliSearch's documentation regarding binary compatibility](https://github.com/meilisearch/meilisearch-php#-compatibility-with-meilisearch).
88
88
89
89
> {note} When upgrading Scout on an application that utilizes MeiliSearch, you should always [review any additional breaking changes](https://github.com/meilisearch/MeiliSearch/releases) to the MeiliSearch service itself.
90
90
@@ -400,7 +400,7 @@ You may use the `whereIn` method to constrain results against a given set of val
400
400
$orders = Order::search('Star Trek')->whereIn(
401
401
'status', ['paid', 'open']
402
402
)->get();
403
-
403
+
404
404
Since a search index is not a relational database, more advanced "where" clauses are not currently supported.
0 commit comments