【发布时间】:2019-05-16 21:00:04
【问题描述】:
我在显示设备资源控制器的 index.blade.php 视图时收到错误 404 Page Not Found。
这是我的文件:
App\Http\Controllers\EquipmentController.php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class EquipmentController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return View::make('equipments.index');
}
...
}
路由\web.php
Route::resource('equipment', 'EquipmentController');
资源\视图\设备\index.blade.php
<!DOCTYPE html>
<html>
<head>
<title>Equipment</title>
</head>
<body>
<table>
<thead>
<th>Chillers</th>
<th>Setpoint</th>
</thead>
<tbody>
<tr>
<td>Chiller 1</td>
<td>32°C;</td>
</tr>
<tr>
<td>Chiller 2</td>
<td>32°C;</td>
</tr>
<tr>
<td>Chiller 3</td>
<td>32°C;</td>
</tr>
</tbody>
</table>
</body>
</html>
我已经尝试过 'php artisan cache:clear' 没有效果。请告诉我我做错了什么。谢谢!
【问题讨论】: