conversion icon indicating copy to clipboard operation
conversion copied to clipboard

Call to undefined method [package]

Open bogdanghervan opened this issue 10 years ago • 2 comments

I'm receiving the following error trying to make a conversion under Laravel 5:

exception 'BadMethodCallException' with message 'Call to undefined method [package]' in /var/www/xxxxxxx/src/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php:226

Looks like the package method is no longer available on the service provider. This article might help: https://medium.com/@morrislaptop/bridging-laravel-4-packages-to-laravel-5-2081f19643c6

bogdanghervan avatar Feb 19 '15 06:02 bogdanghervan

I ran into this issue on Laravel 5 as well, a temporary fix is to create a Service Provider like this https://gist.github.com/alexking/79655a8be2ae6360dc20 in app/Providers, and reference that in config/app.php (App\Providers\ConversionServiceProvider).

I'd just do this as a pull request, but I'm not sure that it works with Laravel 4 - basically I just removed the package call, and moved the alias out of the booting callback.

alexking avatar May 20 '15 08:05 alexking

I will update the repo as soon as the get the time. @alexking appreciate your help :)

abhimanyu003 avatar May 20 '15 18:05 abhimanyu003