Skip to content

Commit

Permalink
Merge branch '7.x' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Sep 1, 2020
2 parents b20221d + 692fcb2 commit 3118e7f
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 8 deletions.
6 changes: 5 additions & 1 deletion blade.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ You may check if the application is running in the production environment using
Or, you may determine if the application is running in a specific environment using the `@env` directive:

@env('staging')
// Staging specific content...
// The application is running in "staging"...
@endenv

@env(['staging', 'production'])
// The application is running in "staging" or "production"...
@endenv

<a name="switch-statements"></a>
Expand Down
12 changes: 11 additions & 1 deletion cashier-paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,17 @@ Next, define a route to your Cashier controller within your `routes/web.php` fil

Route::post('paddle/webhook', WebhookController::class);

Cashier emits a `Laravel\Paddle\Events\WebhookReceived` event when a webhook is received, and a `Laravel\Paddle\Events\WebhookHandled` event when a webhook was handled. Both events contain the full payload of the Paddle webhook.
Cashier emits a `Laravel\Paddle\Events\WebhookReceived` event when a webhook is received and a `Laravel\Paddle\Events\WebhookHandled` event when a webhook was handled. Both events contain the full payload of the Paddle webhook.

Cashier also emit events dedicated to the type of the received webhook. In addition to the full payload from Paddle, they also contain the relevant models that were used to process the webhook such as the billable model, the subscription, or the receipt:

<div class="content-list" markdown="1">
- `PaymentSucceeded`
- `SubscriptionPaymentSucceeded`
- `SubscriptionCreated`
- `SubscriptionUpdated`
- `SubscriptionCancelled`
</div>

You can optionally also override the default, built-in webhook route by setting the `CASHIER_WEBHOOK` env variable in your `.env` file. This value should be the full URL to your webhook route and needs to match the URL set in your Paddle control panel:

Expand Down
2 changes: 1 addition & 1 deletion configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ You may also pass arguments to the `environment` method to check if the environm

When an exception is uncaught and the `APP_DEBUG` environment variable is `true`, the debug page will show all environment variables and their contents. In some cases you may want to obscure certain variables. You may do this by updating the `debug_hide` option in your `config/app.php` configuration file.

Some variables are available in both the environment variables and the server / request data. Therefore, you may need to blacklist them for both `$_ENV` and `$_SERVER`:
Some variables are available in both the environment variables and the server / request data. Therefore, you may need to hide them for both `$_ENV` and `$_SERVER`:

return [

Expand Down
100 changes: 98 additions & 2 deletions helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ Laravel includes a variety of global "helper" PHP functions. Many of these funct
[Str::limit](#method-str-limit)
[Str::lower](#method-str-lower)
[Str::orderedUuid](#method-str-ordered-uuid)
[Str::padBoth](#method-str-padboth)
[Str::padLeft](#method-str-padleft)
[Str::padRight](#method-str-padright)
[Str::plural](#method-str-plural)
[Str::random](#method-str-random)
[Str::replaceArray](#method-str-replace-array)
Expand Down Expand Up @@ -156,6 +159,9 @@ Laravel includes a variety of global "helper" PHP functions. Many of these funct
[ltrim](#method-fluent-str-ltrim)
[match](#method-fluent-str-match)
[matchAll](#method-fluent-str-match-all)
[padBoth](#method-fluent-str-padboth)
[padLeft](#method-fluent-str-padleft)
[padRight](#method-fluent-str-padright)
[plural](#method-fluent-str-plural)
[prepend](#method-fluent-str-prepend)
[replace](#method-fluent-str-replace)
Expand Down Expand Up @@ -1276,6 +1282,51 @@ The `Str::orderedUuid` method generates a "timestamp first" UUID that may be eff

return (string) Str::orderedUuid();

<a name="method-str-padboth"></a>
#### `Str::padBoth()` {#collection-method}

The `Str::padBoth` method wraps PHP's `str_pad` function, padding both sides of a string with another:

use Illuminate\Support\Str;

$padded = Str::padBoth('James', 10, '_');

// '__James___'

$padded = Str::padBoth('James', 10);

// ' James '

<a name="method-str-padleft"></a>
#### `Str::padLeft()` {#collection-method}

The `Str::padLeft` method wraps PHP's `str_pad` function, padding the left side of a string with another:

use Illuminate\Support\Str;

$padded = Str::padLeft('James', 10, '-=');

// '-=-=-James'

$padded = Str::padLeft('James', 10);

// ' James'

<a name="method-str-padright"></a>
#### `Str::padRight()` {#collection-method}

The `Str::padRight` method wraps PHP's `str_pad` function, padding the right side of a string with another:

use Illuminate\Support\Str;

$padded = Str::padRight('James', 10, '-');

// 'James-----'

$padded = Str::padRight('James', 10);

// 'James '

<a name="method-str-plural"></a>
#### `Str::plural()` {#collection-method}

Expand Down Expand Up @@ -1739,7 +1790,7 @@ The `isAscii` method determines if a given string is an ASCII string:

// true

$result = Str::of('ü')->isAcii();
$result = Str::of('ü')->isAscii();

// false

Expand Down Expand Up @@ -1807,7 +1858,7 @@ The `limit` method truncates the given string at the specified length:

// The quick brown fox...

You may also pass a third argument to change the string that will be appended to the end:
You may also pass a second argument to change the string that will be appended to the end:

use Illuminate\Support\Str;

Expand Down Expand Up @@ -1877,6 +1928,51 @@ If you specify a matching group within the expression, Laravel will return a col

If no matches are found, an empty collection will be returned.

<a name="method-fluent-str-padboth"></a>
#### `padBoth` {#collection-method}

The `padBoth` method wraps PHP's `str_pad` function, padding both sides of a string with another:

use Illuminate\Support\Str;

$padded = Str::of('James')->padBoth(10, '_');

// '__James___'

$padded = Str::of('James')->padBoth(10);

// ' James '

<a name="method-fluent-str-padleft"></a>
#### `padLeft` {#collection-method}

The `padLeft` method wraps PHP's `str_pad` function, padding the left side of a string with another:

use Illuminate\Support\Str;

$padded = Str::of('James')->padLeft(10, '-=');

// '-=-=-James'

$padded = Str::of('James')->padLeft(10);

// ' James'

<a name="method-fluent-str-padright"></a>
#### `padRight` {#collection-method}

The `padRight` method wraps PHP's `str_pad` function, padding the right side of a string with another:

use Illuminate\Support\Str;

$padded = Str::of('James')->padRight(10, '-');

// 'James-----'

$padded = Str::of('James')->padRight(10);

// 'James '

<a name="method-fluent-str-plural"></a>
#### `plural` {#collection-method}

Expand Down
2 changes: 1 addition & 1 deletion homestead.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Optional software is installed using the "features" setting in your Homestead co
- crystal: true
- docker: true
- elasticsearch:
version: 7
version: 7.9.0
- gearman: true
- golang: true
- grafana: true
Expand Down
18 changes: 18 additions & 0 deletions redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,24 @@ The default server configuration should suffice for development. However, you ar

],

#### Configuring The Connection Scheme

By default, Redis clients will use the `tcp` scheme when connecting to your Reids servers; however, you may use TLS / SSL encryption by specifying a `scheme` configuration option in your Redis server configuration:

'redis' => [

'client' => env('REDIS_CLIENT', 'phpredis'),

'default' => [
'scheme' => 'tls',
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DB', 0),
],

],

#### Configuring Clusters

If your application is utilizing a cluster of Redis servers, you should define these clusters within a `clusters` key of your Redis configuration:
Expand Down
4 changes: 2 additions & 2 deletions testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Laravel is built with testing in mind. In fact, support for testing with PHPUnit

By default, your application's `tests` directory contains two directories: `Feature` and `Unit`. Unit tests are tests that focus on a very small, isolated portion of your code. In fact, most unit tests probably focus on a single method. Feature tests may test a larger portion of your code, including how several objects interact with each other or even a full HTTP request to a JSON endpoint.

An `ExampleTest.php` file is provided in both the `Feature` and `Unit` test directories. After installing a new Laravel application, run `phpunit` on the command line to run your tests.
An `ExampleTest.php` file is provided in both the `Feature` and `Unit` test directories. After installing a new Laravel application, run `vendor/bin/phpunit` on the command line to run your tests.

<a name="environment"></a>
## Environment

When running tests via `phpunit`, Laravel will automatically set the configuration environment to `testing` because of the environment variables defined in the `phpunit.xml` file. Laravel also automatically configures the session and cache to the `array` driver while testing, meaning no session or cache data will be persisted while testing.
When running tests via `vendor/bin/phpunit`, Laravel will automatically set the configuration environment to `testing` because of the environment variables defined in the `phpunit.xml` file. Laravel also automatically configures the session and cache to the `array` driver while testing, meaning no session or cache data will be persisted while testing.

You are free to define other testing environment configuration values as necessary. The `testing` environment variables may be configured in the `phpunit.xml` file, but make sure to clear your configuration cache using the `config:clear` Artisan command before running your tests!

Expand Down

0 comments on commit 3118e7f

Please sign in to comment.