调用未定义的方法[package]

时间:2015-05-07 07:34:52

标签: php laravel octobercms

我正在尝试编写插件,在插件创建的文件夹中创建了composer.json

{
  "Require": {
      "Php": "> = 5.4.0",
      "Mattbrown / laracurl": "2.0.0"
   }
}

把plugin.php

public function boot ()
{
    App :: register ('\ Mattbrown \ Laracurl \ LaracurlServiceProvider');
}

但是当你调用任何一个页面时会发生下一次拦截

Call to undefined method [package]
***** / Vendor / laravel / framework / src / Illuminate / Support /    ServiceProvider.php line 226

# Called Code Document Line

14  Illuminate\Support\ServiceProvider->__call(…)   ~/plugins/triagmas/parser/vendor/mattbrown/laracurl/src/Mattbrown/Laracurl/LaracurlServiceProvider.php  21
13  Mattbrown\Laracurl\LaracurlServiceProvider->package(…)  ~/plugins/triagmas/parser/vendor/mattbrown/laracurl/src/Mattbrown/Laracurl/LaracurlServiceProvider.php  21
12  Mattbrown\Laracurl\LaracurlServiceProvider->boot()      
11  call_user_func_array(…)     ~/vendor/laravel/framework/src/Illuminate/Container/Container.php   523
10  Illuminate\Container\Container->call(…)     ~/vendor/laravel/framework/src/Illuminate/Foundation/Application.php    703
9   Illuminate\Foundation\Application->bootProvider(…)  ~/vendor/laravel/framework/src/Illuminate/Foundation/Application.php    685
8   Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(…)       
7   array_walk(…)   ~/vendor/laravel/framework/src/Illuminate/Foundation/Application.php    686
6   Illuminate\Foundation\Application->boot()   ~/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php    15
5   Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(…)     ~/vendor/laravel/framework/src/Illuminate/Foundation/Application.php    181
4   Illuminate\Foundation\Application->bootstrapWith(…)     ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php    199
3   Illuminate\Foundation\Http\Kernel->bootstrap()  ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php    110
2   Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(…)  ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php    84
1   Illuminate\Foundation\Http\Kernel->handle(…)    ~/index.php

请告诉我如何处理我的错误

1 个答案:

答案 0 :(得分:-2)

您可以在ocms论坛的帖子中找到您的答案:http://goo.gl/kXD78r