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: original-en/authorization.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -168,8 +168,8 @@ So far, we have only examined gates that return simple boolean values. However,
168
168
169
169
Gate::define('edit-settings', function (User $user) {
170
170
return $user->isAdmin
171
-
? Response::allow()
172
-
: Response::deny('You must be an administrator.');
171
+
? Response::allow()
172
+
: Response::deny('You must be an administrator.');
173
173
});
174
174
175
175
Even when you return an authorization response from your gate, the `Gate::allows` method will still return a simple boolean value; however, you may use the `Gate::inspect` method to get the full authorization response returned by the gate:
@@ -199,8 +199,8 @@ When an action is denied via a Gate, a `403` HTTP response is returned; however,
199
199
200
200
Gate::define('edit-settings', function (User $user) {
201
201
return $user->isAdmin
202
-
? Response::allow()
203
-
: Response::denyWithStatus(404);
202
+
? Response::allow()
203
+
: Response::denyWithStatus(404);
204
204
});
205
205
206
206
Because hiding resources via a `404` response is such a common pattern for web applications, the `denyAsNotFound` method is offered for convenience:
@@ -211,8 +211,8 @@ Because hiding resources via a `404` response is such a common pattern for web a
211
211
212
212
Gate::define('edit-settings', function (User $user) {
213
213
return $user->isAdmin
214
-
? Response::allow()
215
-
: Response::denyAsNotFound();
214
+
? Response::allow()
215
+
: Response::denyAsNotFound();
216
216
});
217
217
218
218
<aname="intercepting-gate-checks"></a>
@@ -362,8 +362,8 @@ So far, we have only examined policy methods that return simple boolean values.
362
362
public function update(User $user, Post $post): Response
363
363
{
364
364
return $user->id === $post->user_id
365
-
? Response::allow()
366
-
: Response::deny('You do not own this post.');
365
+
? Response::allow()
366
+
: Response::deny('You do not own this post.');
367
367
}
368
368
369
369
When returning an authorization response from your policy, the `Gate::allows` method will still return a simple boolean value; however, you may use the `Gate::inspect` method to get the full authorization response returned by the gate:
@@ -399,8 +399,8 @@ When an action is denied via a policy method, a `403` HTTP response is returned;
399
399
public function update(User $user, Post $post): Response
400
400
{
401
401
return $user->id === $post->user_id
402
-
? Response::allow()
403
-
: Response::denyWithStatus(404);
402
+
? Response::allow()
403
+
: Response::denyWithStatus(404);
404
404
}
405
405
406
406
Because hiding resources via a `404` response is such a common pattern for web applications, the `denyAsNotFound` method is offered for convenience:
@@ -415,8 +415,8 @@ Because hiding resources via a `404` response is such a common pattern for web a
415
415
public function update(User $user, Post $post): Response
Copy file name to clipboardExpand all lines: original-en/billing.md
+20-20
Original file line number
Diff line number
Diff line change
@@ -842,8 +842,8 @@ The amount of time a customer has to pay their invoice before their subscription
842
842
If you would like to set a specific [quantity](https://stripe.com/docs/billing/subscriptions/quantities) for the price when creating the subscription, you should invoke the `quantity` method on the subscription builder before creating the subscription:
Or, if you would like to apply a [Stripe promotion code](https://stripe.com/docs/billing/subscriptions/discounts/codes), you may use the `withPromotionCode` method:
The given promotion code ID should be the Stripe API ID assigned to the promotion code and not the customer facing promotion code. If you need to find a promotion code ID based on a given customer facing promotion code, you may use the `findPromotionCode` method:
875
875
@@ -1104,8 +1104,8 @@ If the customer is on trial, the trial period will be maintained. Additionally,
1104
1104
If you would like to swap prices and cancel any trial period the customer is currently on, you may invoke the `skipTrial` method:
1105
1105
1106
1106
$user->subscription('default')
1107
-
->skipTrial()
1108
-
->swap('price_yearly');
1107
+
->skipTrial()
1108
+
->swap('price_yearly');
1109
1109
1110
1110
If you would like to swap prices and immediately invoice the customer instead of waiting for their next billing cycle, you may use the `swapAndInvoice` method:
1111
1111
@@ -1237,8 +1237,8 @@ If you want to swap a single price on a subscription, you may do so using the `s
1237
1237
$user = User::find(1);
1238
1238
1239
1239
$user->subscription('default')
1240
-
->findItemOrFail('price_basic')
1241
-
->swap('price_pro');
1240
+
->findItemOrFail('price_basic')
1241
+
->swap('price_pro');
1242
1242
1243
1243
<aname="proration"></a>
1244
1244
#### Proration
@@ -1329,9 +1329,9 @@ To start using usage billing, you will first need to create a new product in you
1329
1329
You may also start a metered subscription via [Stripe Checkout](#checkout):
1330
1330
1331
1331
$checkout = Auth::user()
1332
-
->newSubscription('default', [])
1333
-
->meteredPrice('price_metered')
1334
-
->checkout();
1332
+
->newSubscription('default', [])
1333
+
->meteredPrice('price_metered')
1334
+
->checkout();
1335
1335
1336
1336
return view('your-checkout-view', [
1337
1337
'checkout' => $checkout,
@@ -1441,8 +1441,8 @@ By default, the billing cycle anchor is the date the subscription was created or
1441
1441
$anchor = Carbon::parse('first day of next month');
You may determine if a user is within their trial period using either the `onTrial` method of the user instance or the `onTrial` method of the subscription instance. The two examples below are equivalent:
1530
1530
@@ -2131,7 +2131,7 @@ First, you could redirect your customer to the dedicated payment confirmation pa
Copy file name to clipboardExpand all lines: original-en/configuration.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
18
18
All of the configuration files for the Laravel framework are stored in the `config` directory. Each option is documented, so feel free to look through the files and get familiar with the options available to you.
19
19
20
-
These configuration files allow you to configure things like your database connection information, your mail server information, as well as various other core configuration values such as your application timezone and encryption key.
20
+
These configuration files allow you to configure things like your database connection information, your mail server information, as well as various other core configuration values such as your application URL and encryption key.
0 commit comments