Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined method Illuminate\Foundation\Application::share() #10

Open
maryglo opened this issue Apr 5, 2018 · 0 comments
Open

Comments

@maryglo
Copy link

maryglo commented Apr 5, 2018

Hello,

I tried installing the module on the recent version of laravel but unfortunately I got an error when I tried to publish it. I checked the issue and it is on line 43 of the file /laravelhungary/announcement/src/Package/PackageServiceProvider.php. I research for it and the share() method is no longer supported on the recent version of laravel. As a solution, singletion() is being used now.

so I changed the code starting line 43 of the class to

$this->app->singleton('announce', function () {
return new Announce();
});

and this solves the issue.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant