Whoops in Laravel 5.5

Last Updated at : July 25, 2017 By - Usama Muneer | 2383

    What is Whoops?

    Whoops is a nice little library that helps you develop and maintain your projects better, by helping you deal with errors and exceptions in a painless way.

    Laravel 5.5 and Whoops

    As you all might know, Taylor Otwell is bringing Whoops back in Laravel 5.5. So, we pulled in Laravel’s development build in order to see how it actually works.

    Installing Laravel –dev

    laravel new laravel55 --dev

    Running the application

    Simply type in your terminal

    php artisan serve

    I’m using Laravel Valet here so I don’t need to run the serve command.

    Straight out you’ll notice something different here. A cool error screen maybe? But we just installed a fresh Laravel application. The error is telling us that our application doesn’t have any key. Obviously, everything was pulled in from the development build.

    So let’s run this command and see if that would fix this.

    php artisan key:generate

    Now head back and check if the error message disappears.

    Conclusion

    Whoops is a really cool errors management utility which lets you know the errors by providing the every possible details and the line numbers, so that one can understand it more easily and fix it.

    Laravel 5.5 is set to release in the next month & this is one of the cool features which Taylor is about to bring in with this next major Laravel release.

    Try and test it yourself by purposely missing the semicolon, maybe in your routes file & see what it look like in the front-end.

    blog user
    Usama Muneer

    A web enthusiastic, self-motivated & detail-oriented professional Full-Stack Web Developer from Karachi, Pakistan with experience in developing applications using JavaScript, WordPress & Laravel specifically. Loves to write on different web technologies with an equally useful skill to make some sense out of it.

    Related Posts

    Laravel Live Islamabad, ended on 24th Nov'18 & we got a lot to learn from the top-notch of speakers & influencers. Thanks to the sponsors for pulling off such a great event in the capital of Pakistan.

    Previously Localization in Laravel was done by creating separate directories for each locales and place in under resources/lang/ and add key value pairs to every single keyword in a number of files as per their modules.

    Another #LaraconUS in the books & It was the 6th instalment of #LaraconUS happened at Chicago with full swing & we got a lot to learn this time with exceptional line of speakers and never-ending community support by fellow Artisans

    Laravel is one of a famous and widely used PHP framework which is growing with immense pace since its version 4.2. Learning Laravel & Setting up your application locally is not much of a difficult task but when it comes to deployment, developers often find it a bit tricky to handle.