Debugging with Laravel Telescope (Part 1)
In the article, we will discuss “Debugging with Laravel Telescope”. Laravel provides a wonderful debugging assistance Laravel Telescope. As you know, when we developing an application then it is impossible to avoid bugs. Laravel Telescope empower us to manage to debug an application.
Telescope not only allow to monitor and debug but provide the wide range of information which is not normally available to view. You can view complete insights for the requests coming into your application, exceptions, database queries, queued jobs, emails, log entries, notification, cache and lots more. Also, we can get which pages are working right and which database queries were run when a request was made.
Table of Contents
Let’s Setup Laravel Telescope
Installation
We need to make sure this to use the latest version on Laravel or use minimum version 5.7.7
Use following composer command to install the Laravel Telescope in your application.
composer require laravel/telescope
You need to execute the following artisan command. These commands are necessary to complete the Laravel Telescope setup.
// Publish telescope package assets php artisan telescope:install
// Create a necessary database table, migration files are created after executing the above mention artisan command. php artisan migrate
Installing for a specific environment
If you want to install Telescopes to assist your local development only. Then you need to use the following command, in this command we use additional “–dev” flag for the development environment.
composer require laravel/telescope --dev
Let’s Execute the Telescope
After completing the installation, you just need to visit “/telescope” on your project.
As you see, the left sidebar shows all of telescope features such as Requests, Commands, Schedule, Jobs, Exceptions, Logs, Dumps, Queries, Models, Events, Mail, Notifications, Gates, Cache and Redis.
We will discuss all the features in our future article with depth details, which helps you to debug your Laravel Application.
Conclusion
In this article, we are discussing Laravel Telescope Setup. You can check the official Laravel Telescope documentation. We will cover each of its feature in our future articles. You can also check our other Laravel articles. Please feel free to add comments or you can submit your feedback 😉
If you like our content, please consider buying us a coffee.
Thank you for your support!
Buy Me a Coffee
Ждем с нетерпением продолжения!