Is your nginx config correct? Did you run migrations and create your .env? Are you serving from the public directory? Did you use leading slashes for assets? There are a bunch of questions related to a blank page. Maybe increase the details of the question...like the steps you took and how it is hosted.
laravel 5.5 blank page after deployment
Hi everyone, I have a local dev environment on Homestead that works very well.
However, when I deploy it to the production server, I do everything as described in https://laravel.com/docs/5.5 I get a blank page instead of my view.
$ php artisan route:list
+--------+----------+-----------------+------+---------+--------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+-----------------+------+---------+--------------+
| | GET|HEAD | / | | Closure | web |
| | GET|HEAD | api/user | | Closure | api,auth:api |
| | GET|HEAD | articles | | Closure | web |
| | GET|HEAD | ria | | Closure | web |
| | GET|HEAD | ria-lenta | | Closure | web |
| | GET|HEAD | ria-lenta-links | | Closure | web |
+--------+----------+-----------------+------+---------+--------------+
And the code of the route is:
Route::get('/articles', function () {
$articles = Article::all()
->sortByDesc("id");
return view('articles.index', array('articles' => $articles));
});
Could you please point me where to start digging? the nginx error.log is absolutely empty.
The fastest way to start debugging this is to open the main index.php file that nginx points to and add a simple
die('Working');
in it. If you see it, it's a PHP/Laravel issue. If you don't, it's an nginx issue.
After this, if you see the "Working" message, tail storage/logs/laravel.log file to see if anything got dumped there. The production environment isn't very verbose when it comes to errors.
Please or to participate in this conversation.