我正在处理一个laravel项目,希望从服务器(postgresql)检索数据。我的Model文件夹中有类webmaster_tool,但每次我试图用Eloquent调用它时,我都会收到这个错误:
符号''组件''调试''异常''致命错误异常(E_ERROR) 未找到类'webmass_tool'
这是我的控制器:
<?php
/*Controller*/
class WebmastersController extends BaseController {
public function index() {
$webmasters_tools = webmasters_tool::all();
return View::make('webmasters_tools.index', ['webmasters_tools' => $webmasters_tools]);
}
}
我的型号:
<?php
//Modell
class webmasters_tool extends Eloquent {
}
我的路线:
Route::get('/webmasters_tools', 'WebmastersController@index');
如果有人在这里帮助我,我将不胜感激。
可能您缺少使用声明:
use App'webmasters_tool;