larapi icon indicating copy to clipboard operation
larapi copied to clipboard

UserServiceProvider and EventServiceProvider

Open LukasJK opened this issue 9 years ago • 1 comments

Hey! Just a quick one - UserServiceProvider references use Infrastructure\Events\EventServiceProvider; which does not seem to exist?

LukasJK avatar Apr 23 '17 04:04 LukasJK

class UserServiceProvider extends EventServiceProvider

But this would not work, since it doesn't know EventServiceProvider

So I had to replace use Infrastructure\Events\EventServiceProvider; with use Illuminate\Foundation\Support\Providers\EventServiceProvider; in api/Users/UserServiceProvider.php

And also had to add the provider to config/app.php

The other way is to add file infrastructure/Events/EventServiceProvider.php with code

<?php

namespace Infrastructure\Events;

use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;

class EventServiceProvider extends ServiceProvider
{
}

gruz avatar May 03 '17 12:05 gruz