Laravel Package的控制器不存在

时间:2015-06-05 11:14:45

标签: exception laravel reflection controller package

我有一个Laravel 4.2应用程序。在这里我有两个包的工作台文件夹。一个包装是车辆包装。我已经附上了包装的结构。 在包route.php中,我有一条路线:

Route::get('/vehicles', array(
    'as' => 'vehicles', 'uses' => 'VehicleController@index'
    )
);

对于此路线,我在index()

中有一个VehicleController.php方法

注意:在the config/app.php我添加了VehicleServiceProvider.php

当我使用localhost/Application_Root/public/vehicles运行应用程序时,它会正确地重定向到根目录,但会给出反射异常“VehicleController不存在。”

有人可以帮我这个吗? 提前谢谢!

车辆包装结构:

Vehicle
     -public
     - src
          -config
          -controllers
          -Vendor
                 -Vehicle
                         -Controllers
                         -Models
                         -Repositories
                          VehicleServiceProvider.php
          -migrations
          -views
     -test
     -vendor
          -routes.php

0 个答案:

没有答案