dongpu1881 2014-04-02 07:15
浏览 55
已采纳

没找到Laravel 4 autoload包? (Anvard oauth)

I'm simply following these instructions word by word: https://bitbucket.org/atticmedia/anvard

I added anvard to my dependency in autoload.json

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
            "laravel/framework": "4.0.*",
            "atticmedia/anvard": "dev-master"
},

EDIT: changed the package name issue to the correct package: from "atticmedia-anvard": "*" to "atticmedia/anvard": "dev-master". (due to error in instructions on front page)

Running the command:

php composer.phar install

Returns an error of

Could not open input file: composer.phar

So instead I run the command

composer install 

Which works just fine. EDIT: After running composer dump-autoload, I now get this error:

 [RuntimeException]
 Error Output: PHP Fatal error:  Class 'Atticmedia\Anvard\AnvardServiceProvider' not found in /var/www/litl.it/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 123

I next added

'Atticmedia\Anvard\AnvardServiceProvider', 

to my to config/app.php (I removed the majority of the Illuminate files from the example just to save space in the example of how I inputted the new data, I didn't remove them from the actual file itself)

'providers' => array(
            'Illuminate\View\ViewServiceProvider',
            'Illuminate\Workbench\WorkbenchServiceProvider',
            'Atticmedia\Anvard\AnvardServiceProvider',
            ),

After that, here is where my problem is, I run the command

php artisan config:publish atticmedia/anvard

And I get this error:

[RuntimeException]
Error Output: PHP Fatal error:  Class 'Atticmedia\Anvard\AnvardServiceProvider' not found   in /var/www/litl.it/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 123

Confused where I went wrong, can someone help please?

EDIT: I have tried

composer dump-autoload

Sadly it didn't fix my issue.

  • 写回答

2条回答 默认 最新

  • dongluan1743 2014-04-02 07:46
    关注

    Try to update the composer.json requirement according to the one listed on this page: https://packagist.org/packages/atticmedia/anvard and run composer install or composer update again.

    I don't think the package is actually installed, since I doubt composer is able to find the correct package.

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

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题