【发布时间】:2016-06-24 13:21:46
【问题描述】:
这是我的 alert.blade.php,
@if(Session::has('info'))
<div class="alert alert-info">{{ Session::get('info') }}</div>
@endif
这是我的welcome.blade.php,
<!DOCTYPE html>
<html>
<head>
<title>Laravel</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body>
@include('alert')
</body>
</html>
还有,这是我的 routes.php,
Route::get('/', function () {
return view('welcome')->with('info','Hello World');
});
任何帮助将不胜感激 提前致谢
【问题讨论】:
标签: php laravel laravel-5.1 laravel-5.2 blade