I cannot get laravel blade view to work, removing the blade from file name makes it work. I am using laravel 5.2.22.
Here are the details:
Here is the route:
Route::get('/', function () {
return view('login2');
});
Location and file name of 'login2': /resources/views/login2.blade.php
Inside of login2.blade.php:
<?php
echo "a";
As soon as I change the "login2.blade.php" -> "login2.php" it works.
Any ideas?
我将文件夹storage
权限更改为777,现在刀片视图可以工作。
Try to close tag:
<?php echo "a"; ?>
Blade template files are parsed with a template engine, so you need to close tag if you're using raw PHP inside a template.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.