Upsun User Documentation

Debug with Laravel Telescope

Sign up

Get your free trial by clicking the link below.

Get your Upsun free trial

Laravel Telescope complements your local Laravel development environment. With Telescope, get insight into the requests coming into your app, exceptions, log entries, database queries, queued jobs, mail, notifications, cache operations, scheduled tasks, variable dumps, and more.

To set up Laravel Telescope on your non-production environments, follow these steps.

1. Create the APP_DEBUG variable Anchor to this heading

To add the APP_DEBUG & TELESCOPE_ENABLED variables on your project, run the following commands:

upsun variable:create --level environment --name env:APP_DEBUG --value false
upsun variable:create --level environment --name env:TELESCOPE_ENABLED --value false

Note that the default values for your main environment are set to false. To override them on other non-production environments, run the following commands:

upsun variable:update -e ENVIRONMENT --value true env:APP_DEBUG
upsun variable:update -e ENVIRONMENT --value true env:TELESCOPE_ENABLED

2. Add Telescope to your project Anchor to this heading

  1. Run the following Composer command:

    composer require laravel/telescope && php artisan telescope:install
  2. Add the install command to your build hook in your app configuration, so it’s run on every deploy.

                build: |
                        set -eux
                        composer --no-ansi --no-interaction install --no-progress --prefer-dist --optimize-autoloader --no-dev
                        php artisan telescope:install                    

For more options and information on how to manage authentication for the dashboard, see the Laravel Telecope documentation.

3. Deploy the new release Anchor to this heading

To enable Telescope, push your changes to Upsun:

git add .
git commit -m "Enable Laravel Horizon"
upsun push

You can now access the /telescope endpoint of your app.

Laravel Horizon Dashboard

Is this page helpful?