How to display errors on laravel

0 votes
I'm trying to create an app on Laravel beta but I can't debug it because it doesn't show any error, display_errors is on, error_reporting is E_ALL and debug => true (config/app.php). When I try to do an error on public/index.php it shows a parse error, but when I do it on the router it just shows a blank page (White screen of death).

How can I fix this?
Sep 24, 2020 in Laravel by kartik
• 37,510 points
3,880 views

1 answer to this question.

0 votes

Hello @kartik,

I had a problem with the white screen after installing a new larval instance. I couldn't find anything in the logs because (eventually I found out) that the reason for the white screen was that app/storage wasn't writable.

In order to get an error message on the screen I added the following to the public/index.php

try {
    $app->run();
} catch(\Exception $e) {
    echo "<pre>";
    echo $e;
    echo "</pre>";
}

Hope it helps!!

Thank You!!

answered Sep 24, 2020 by Niroj
• 82,880 points

Related Questions In Laravel

0 votes
1 answer

How to get the id when you're validating in the model Validation unique on update using laravel?

Hello @kartik, in Laravel's inbuilt auth system, the ...READ MORE

answered Sep 11, 2020 in Laravel by Niroj
• 82,880 points
6,292 views
0 votes
1 answer

How to set .env values in laravel programmatically on the fly?

Hello @kartik, Since Laravel uses config files to ...READ MORE

answered Sep 24, 2020 in Laravel by Niroj
• 82,880 points
4,618 views
0 votes
1 answer

How to do update query on laravel fluent using db::raw?

Hello @kartik, Code row updates like this: ...->update( array( ...READ MORE

answered Sep 24, 2020 in Laravel by Niroj
• 82,880 points
12,799 views
0 votes
1 answer

How to run migrations on another database in laravel?

Hello @kartik, If you place database config on ...READ MORE

answered Sep 28, 2020 in Laravel by Niroj
• 82,880 points
2,485 views
0 votes
1 answer

jQuery AJAX fires error callback on window unload - how do I filter out unload and only catch real errors?

Hello, In the error callback or $.ajax you have three ...READ MORE

answered Apr 27, 2020 in Java-Script by Niroj
• 82,880 points
3,711 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

answered May 5, 2020 in Java-Script by Niroj
• 82,880 points
2,919 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

answered May 8, 2020 in PHP by Niroj
• 82,880 points
830 views
+2 votes
1 answer

How do I debug Node.js applications?

Hello @kartik, Use node-inspector  from any browser supporting WebSocket. Breakpoints, ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,880 points
772 views
0 votes
1 answer

How to get all pending jobs in laravel queue on redis?

Hello @kartik, Here is the way I do ...READ MORE

answered Apr 6, 2020 in Laravel by Niroj
• 82,880 points
8,882 views
0 votes
1 answer

How to get data from Laravel backend and display in Vue/Nuxt frontend

Hello, You have to use the package dotenv. Then ...READ MORE

answered Apr 8, 2020 in Laravel by Niroj
• 82,880 points
2,892 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP