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

LaravelShopProvider::boot() should be compatible with RouteServiceProvider::boot() #59

Open
budiantoip opened this issue Feb 16, 2017 · 3 comments

Comments

@budiantoip
Copy link

I just downloaded the package using composer, then configured the config/app.php file, setting up the providers and aliases arrays, then after running :
php artisan vendor:publish
I got this error message :

[ErrorException]
Declaration of Amsgames\LaravelShop\LaravelShopProvider::boot() should be compatible with Illuminate\Foundation\Sup
port\Providers\RouteServiceProvider::boot()

Screenshot :
error

FYI, I'm using laravel 5.3
Did I miss anything?

@MHNassar
Copy link

i try to solve it

1- change your boot in LaravelShopProvider to

public function boot()
{
// Publish config files
$this->publishes([
DIR . '/Config/config.php' => config_path('shop.php'),
]);
$this->commands('command.laravel-shop.migration');
}

2- change bindShared to singleton
it works with me laravel 5.4

@ZaheerAbbasAghani
Copy link

ZaheerAbbasAghani commented Jul 19, 2017

Same issue here and where is LaravelShopProvide

[ErrorException]
Declaration of Amsgames\LaravelShop\LaravelShopProvider::boot(Illuminate\Ro
uting\Router $router) should be compatible with Illuminate\Foundation\Suppo
rt\Providers\RouteServiceProvider::boot()

I have AppServiceProvider , AuthServiceProvider , BroadcastServiceProvider , EventServiceProvider , RouteServiceProvider

and used
$this->publishes([
DIR . '/Config/config.php' => config_path('shop.php'),
]);
$this->commands('command.laravel-shop.migration');

code in AppServiceProvider in boot() method but nothing happend same error again .

@wangge
Copy link

wangge commented Sep 4, 2018

Delete parameter route,then it's ok!

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

4 participants