问题描述:

I have a blade.php file that I am able to go to in my web browser. However, when I go to the file in my web browser I find that the screen is blank, despite the fact that the blade.php file should be displaying text.

Here is the blade.php file

<!DOCTYPE html>

<html>

<head>

<title>Laravel</title>

<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">

<style>

html, body {

height: 100%;

}

body {

margin: 0;

padding: 0;

width: 100%;

display: table;

font-weight: 100;

font-family: 'Lato';

}

.container {

text-align: center;

display: table-cell;

vertical-align: middle;

}

.content {

text-align: center;

display: inline-block;

}

.title {

font-size: 96px;

}

</style>

</head>

<body>

<div class="container">

<div class="content">

<div class="title"> another test </div>

</div>

</div>

</body>

</html>

Since I am able to go the pg in the browser I don't think it is an error with the controller or the routes.php file. I have another blade.php file that has the same code and does display something when I go into it on a web browser.

Here is the file path for the blade.php file that isn't working.

Laravel/resources/views/pages/manualsignup.blade.php

Here is the file path for the blade.php file that is working

Laravel/resources/views/pages/test.blade.php

I have tried doing php artisan view:clear but it hasn't fixed the problem.

I am not getting any error, so to the best of my understanding the logs file won't have anything for this situation. Here are a few of the most recent logs in the log files, but I don't think they are relevant here, I think they are from previous errors that I fixed.

[2016-02-04 16:39:29] local.ERROR: InvalidArgumentException: View [about] not found. in /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php:137

Stack trace:

#0 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php(79): Illuminate\View\FileViewFinder->findInPaths('about', Array)

#1 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/View/Factory.php(151): Illuminate\View\FileViewFinder->find('about')

#2 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(737): Illuminate\View\Factory->make('about', Array, Array)

#3 /home/vagrant/Code/Laravel/app/Http/routes.php(21): view('about')

#4 [internal function]: App\Providers\RouteServiceProvider->{closure}()

网友答案:

Logs

Laravel provides logs, be sure of your version of Laravel to have the right location.

Laravel 5 storage/logs

Laravel 4 app/storage/logs

These files are very helpfully, try to find there any information about the blade render.

Permissions

Otherwise you can try to set the right permissions to the folder storage, when i say right permissions i mean to write permissions for your current user. This would to the trick.

sudo chmod -R 777 storage/
网友答案:

So after spending a few hours on this I realized that I didn't have return view("pages.filename") in my controller. Sorry about that

相关阅读:
Top