从4.2迁移到5.0时, 遇到包不能Intervention\Image包不能使用的问题。

关键词 Intervention\Image;laravel5;扩展包不能使用
详细问题:4.2升级5.0过程中,使用扩展包失呗
BadMethodCallException in ServiceProvider.php line 226:
Call to undefined method [package]
in ServiceProvider.php line 226
at ServiceProvider->__call('package', array('intervention/image')) in ImageServiceProvider.php line 24
at ImageServiceProvider->package('intervention/image') in ImageServiceProvider.php line 24
at ImageServiceProvider->boot()
at call_user_func_array(array(object(ImageServiceProvider), 'boot'), array()) in Container.php line 523
at Container->call(array(object(ImageServiceProvider), 'boot')) in Application.php line 672
at Application->bootProvider(object(ImageServiceProvider)) in Application.php line 654
at Application->Illuminate\Foundation{closure}(object(ImageServiceProvider), '2')
at array_walk(array(object(EventServiceProvider), object(RoutingServiceProvider), object(ImageServiceProvider), object(AuthServiceProvider), object(ControllerServiceProvider), object(CookieServiceProvider), object(DatabaseServiceProvider), object(EncryptionServiceProvider), object(FilesystemServiceProvider), object(FormRequestServiceProvider), object(FoundationServiceProvider), object(PaginationServiceProvider), object(SessionServiceProvider), object(ValidationServiceProvider), object(ViewServiceProvider), object(AppServiceProvider), object(BusServiceProvider), object(ConfigServiceProvider), object(EventServiceProvider), object(RouteServiceProvider)), object(Closure)) in Application.php line 655
at Application->boot() in BootProviders.php line 15
at BootProviders->bootstrap(object(Application)) in Application.php line 167
at Application->bootstrapWith(array('Illuminate\Foundation\Bootstrap\DetectEnvironment', 'Illuminate\Foundation\Bootstrap\LoadConfiguration', 'Illuminate\Foundation\Bootstrap\ConfigureLogging', 'Illuminate\Foundation\Bootstrap\HandleExceptions', 'Illuminate\Foundation\Bootstrap\RegisterFacades', 'Illuminate\Foundation\Bootstrap\RegisterProviders', 'Illuminate\Foundation\Bootstrap\BootProviders')) in Kernel.php line 163
at Kernel->bootstrap() in Kernel.php line 106
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84
at Kernel->handle(object(Request)) in index.php line 53
已邀请:

zhuzhichao

赞同来自: FiveSay xiangzi

你用的包版本不对,使用2.1.0以后的版本

xiangzi

赞同来自:

不知道怎么上传截图,就上传错误信息吧。
BadMethodCallException in ServiceProvider.php line 226:
Call to undefined method [package]
in ServiceProvider.php line 226
at ServiceProvider->__call('package', array('intervention/image')) in ImageServiceProvider.php line 24
at ImageServiceProvider->package('intervention/image') in ImageServiceProvider.php line 24
at ImageServiceProvider->boot()
at call_user_func_array(array(object(ImageServiceProvider), 'boot'), array()) in Container.php line 523
at Container->call(array(object(ImageServiceProvider), 'boot')) in Application.php line 672
at Application->bootProvider(object(ImageServiceProvider)) in Application.php line 654
at Application->Illuminate\Foundation{closure}(object(ImageServiceProvider), '2')
at array_walk(array(object(EventServiceProvider), object(RoutingServiceProvider), object(ImageServiceProvider), object(AuthServiceProvider), object(ControllerServiceProvider), object(CookieServiceProvider), object(DatabaseServiceProvider), object(EncryptionServiceProvider), object(FilesystemServiceProvider), object(FormRequestServiceProvider), object(FoundationServiceProvider), object(PaginationServiceProvider), object(SessionServiceProvider), object(ValidationServiceProvider), object(ViewServiceProvider), object(AppServiceProvider), object(BusServiceProvider), object(ConfigServiceProvider), object(EventServiceProvider), object(RouteServiceProvider)), object(Closure)) in Application.php line 655
at Application->boot() in BootProviders.php line 15
at BootProviders->bootstrap(object(Application)) in Application.php line 167
at Application->bootstrapWith(array('Illuminate\Foundation\Bootstrap\DetectEnvironment', 'Illuminate\Foundation\Bootstrap\LoadConfiguration', 'Illuminate\Foundation\Bootstrap\ConfigureLogging', 'Illuminate\Foundation\Bootstrap\HandleExceptions', 'Illuminate\Foundation\Bootstrap\RegisterFacades', 'Illuminate\Foundation\Bootstrap\RegisterProviders', 'Illuminate\Foundation\Bootstrap\BootProviders')) in Kernel.php line 163
at Kernel->bootstrap() in Kernel.php line 106
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84
at Kernel->handle(object(Request)) in index.php line 53

要回复问题请先登录注册