How to Work with Telescope In Laravel 8 Tutorial

Reading Time: 4 minutes
4,992 Views

Using Laravel Telescope can debug requests, exceptions, databases, cache, and much more in real-time by accessing a specific route in your local or production environment in laravel 8 application.

Inside this article we will see how to work with Telescope in laravel 8.

This is very interesting topic to learn about a laravel debugging tool i.e laravel telescope. We have only few simple commands to run to get the things working.

Let’s get started.


Laravel Installation

We will create laravel project using composer. So, please make sure your system should have composer installed. If not, may be this article will help you to Install composer in system.

Here is the command to create a laravel project-

composer create-project --prefer-dist laravel/laravel blog

To start the development server of Laravel –

php artisan serve

URL: http://127.0.0.1:8000

Assuming laravel already installed inside your system.


Install Laravel Telescope – A Composer Pacakge

Laravel telescope is a composer package which is developed to use it for laravel applications.

Open project into terminal and run this command.

$ composer require laravel/telescope

If you want to use telescope in local environment, so you can use the below command:

$ composer require laravel/telescope --dev

Publishing Telescope Scaffolding & Migration

Back to terminal and run this given command. It will generate Telescope associated service provider, assets, configuration etc.

$ php artisan telescope:install

Automatically, a provider will be added into providers array of /config/app.php i.e App\Providers\TelescopeServiceProvider::class,

Migrate Telescope Migration

$ php artisan migrate

All we done ! No more settings required.


Application Testing

Run this command into project terminal to start development server,

php artisan serve

URL: http://127.0.0.1/telescope

Above is the dashboard of Telescope monitoring screen. Let’s run few commands to see, how it works.

Run Php Artisan Command

We have run few artisan commands, have a look into telescope monitoring screen

Running Application routes

We have a sample route, after running it into browser. Have a look into monitoring screen.

Telescope Files Information

To see the working files which are responsible for all these functionalities, here is the path.

/vendor/laravel/telescope

We hope this article helped you to learn about How to Work with Telescope In Laravel 8 Tutorial in a very detailed way.

If you liked this article, then please subscribe to our YouTube Channel for PHP & it’s framework, WordPress, Node Js video tutorials. You can also find us on Twitter and Facebook.