Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Suggest asset publishing Composer hook #6230

Merged
merged 9 commits into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion horizon.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,19 @@ Horizon exposes a dashboard at `/horizon`. By default, you will only be able to

When upgrading to a new major version of Horizon, it's important that you carefully review [the upgrade guide](https://github.com/laravel/horizon/blob/master/UPGRADE.md).

In addition, you should re-publish Horizon's assets:
In addition, when upgrading to any new Horizon version, you should re-publish Horizon's assets:

php artisan horizon:publish

To keep the assets up-to-date and avoid issues in future updates, we highly recommend adding the command to the `post-autoload-dump` scripts in your `composer.json` file:
driesvints marked this conversation as resolved.
Show resolved Hide resolved

{
"scripts": {
"post-update-cmd": [
"@php artisan horizon:publish --ansi"
]
}
}

<a name="running-horizon"></a>
## Running Horizon
Expand Down
28 changes: 20 additions & 8 deletions telescope.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
- [Configuration](#configuration)
- [Data Pruning](#data-pruning)
- [Migration Customization](#migration-customization)
- [Dashboard Authorization](#dashboard-authorization)
- [Dashboard Authorization](#dashboard-authorization)
- [Upgrading Telescope](#upgrading-telescope)
- [Filtering](#filtering)
- [Entries](#filtering-entries)
- [Batches](#filtering-batches)
Expand Down Expand Up @@ -50,12 +51,6 @@ After installing Telescope, publish its assets using the `telescope:install` Art

php artisan migrate

#### Updating Telescope

When updating Telescope, you should re-publish Telescope's assets:

php artisan telescope:publish

### Installing Only In Specific Environments

If you plan to only use Telescope to assist your local development, you may install Telescope using the `--dev` flag:
Expand Down Expand Up @@ -113,7 +108,7 @@ By default, all entries older than 24 hours will be pruned. You may use the `hou
$schedule->command('telescope:prune --hours=48')->daily();

<a name="dashboard-authorization"></a>
## Dashboard Authorization
### Dashboard Authorization

Telescope exposes a dashboard at `/telescope`. By default, you will only be able to access this dashboard in the `local` environment. Within your `app/Providers/TelescopeServiceProvider.php` file, there is a `gate` method. This authorization gate controls access to Telescope in **non-local** environments. You are free to modify this gate as needed to restrict access to your Telescope installation:

Expand All @@ -134,6 +129,23 @@ Telescope exposes a dashboard at `/telescope`. By default, you will only be able
}

> {note} You should ensure you change your `APP_ENV` environment variable to `production` in your production environment. Otherwise, your Telescope installation will be publicly available.

<a name="upgrading-telescope"></a>
## Upgrading Telescope

When upgrading to a new version of Telescope, you should re-publish Telescope's assets:

php artisan telescope:publish

To keep the assets up-to-date and avoid issues in future updates, we highly recommend adding the command to the `post-autoload-dump` scripts in your `composer.json` file:
driesvints marked this conversation as resolved.
Show resolved Hide resolved

{
"scripts": {
"post-update-cmd": [
"@php artisan telescope:publish --ansi"
]
}
}

<a name="filtering"></a>
## Filtering
Expand Down