Laravel 5.1类库存\ Http \ Controllers \ inventory不存在

时间:2015-11-06 03:23:43

标签: php laravel

我的laravel系统正在我的电脑上工作。当我上传到公司服务器时出现错误..

     ReflectionException in Container.php line 737:
     Class Inventory\Http\Controllers\inventory does not exist

这是我的代码

routes.php文件

     Route::get('/','inventory@index');

...控制器  Inventory.php

      namespace Inventory\Http\Controllers;
      use Inventory\Http\Requests;
      use Inventory\Http\Controllers\Controller;
      use Illuminate\Http\Request;
      use Inventory\Model\Inventorys;

      class Inventory extends Controller
      {
        public function index(){
        $inventory = Inventorys::select('*')->orderBy('id')->get();
        return view('body.body_list')->with('inventory',$inventory);
        }
      }

提前致谢......:D

1 个答案:

答案 0 :(得分:3)

自动加载的类名称区分大小写:

Route::get('/', 'Inventory@index');
//               ^