dtkyayvldeaqhl7151 2014-01-05 15:42
浏览 197
已采纳

在为Controller创建文件夹后找不到模型

Symfony \ Component \ Debug \ Exception \ FatalErrorException
Class 'Controllers\Admin\User' not found

<?php namespace Controllers\Admin;
class UserStoreController extends BaseController{

Location of my Controller is app>controllers>admin>UserStoreController.php It would work well outside admin folder, but once it's in admin folder it would fail.

I also tried PSR-0 on composer.phar autoload & use app\models\user;

basically i'm just trying to use laravel's ORM but i cant because the controller is in the folder.

Any idea how i could go around this issue?

  • 写回答

2条回答 默认 最新

  • dpcwz210393 2014-01-05 15:56
    关注

    You need to update the autoloader

    composer dump-autoload
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?