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 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 arduino控制ps2手柄一直报错
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 求chat4.0解答一道线性规划题,用lingo编程运行,第一问要求写出数学模型和lingo语言编程模型,第二问第三问解答就行,我的ddl要到了谁来求了
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题