PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 15, 2022

[FIXED] How to Install Whoops in Laravel 6 and Above Versions

 November 15, 2022     laravel, laravel-6, laravel-6.2, php, whoops     No comments   

Issue

I have been Working on the Laravel Framework Since 5.4

Here is the History of Laravel Versions And Error Handlers

  • 4.0 - 4.2 - filp/whoops
  • 5.0 - 5.4 - symfony/error-handler
  • 5.5 - 5.8 - filp/whoops

And By the Relese of Laravel 6.0 they have introduced the new error page Called Ignition

And this package has built in advanced Debugging. But obiviuously this is Done by VueJS.

So At the time Debugging the Api Request in Postman I am not Getting Anything in the Preview.

So is there any Way to Switch to Whoops in the Laravel 6.0 and Future Versions.

Because there is Option to Switch to Ignition even in the Older version of laravel projects

using the Below code in app/Exceptions/Handler.php

protected function whoopsHandler()
{
    try {
        return app(\Whoops\Handler\HandlerInterface::class);
    } catch (\Illuminate\Contracts\Container\BindingResolutionException $e) {
        return parent::whoopsHandler();
    }
}

Solution

luckily, since filp/whoops is still in your composer.json (or at least it was in mine) all you have to do is run composer remove facade/ignition and whoops will take over again.

if not, reinstall filp/whoops with composer require filp/whoops --dev, and remove ignition and that should be it.



Answered By - ITwrx
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing