faithgen /
events
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Innoflash\Events; |
||
| 4 | |||
| 5 | use FaithGen\SDK\Traits\ConfigTrait; |
||
| 6 | use Illuminate\Support\ServiceProvider; |
||
| 7 | use Innoflash\Events\Models\Event; |
||
| 8 | use Innoflash\Events\Models\Guest; |
||
| 9 | use Innoflash\Events\Observers\EventObserver; |
||
| 10 | use Innoflash\Events\Observers\GuestObserver; |
||
| 11 | use Innoflash\Events\Services\EventsService; |
||
| 12 | use Innoflash\Events\Services\GuestService; |
||
| 13 | |||
| 14 | class EventsServiceProvider extends ServiceProvider |
||
| 15 | { |
||
| 16 | use ConfigTrait; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Bootstrap any application services. |
||
| 20 | * |
||
| 21 | * @return void |
||
| 22 | */ |
||
| 23 | public function boot() |
||
| 24 | { |
||
| 25 | $this->registerRoutes(__DIR__.'/../routes/events.php', __DIR__.'/../routes/source.php'); |
||
| 26 | |||
| 27 | $this->setUpSourceFiles(function () { |
||
| 28 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
||
| 29 | |||
| 30 | $this->publishes([ |
||
| 31 | __DIR__.'/../database/migrations/' => database_path('migrations'), |
||
| 32 | ], 'faithgen-events-migrations'); |
||
| 33 | |||
| 34 | $this->publishes([ |
||
| 35 | __DIR__.'/../storage/events/' => storage_path('app/public/events'), |
||
| 36 | ], 'faithgen-events-storage'); |
||
| 37 | }); |
||
| 38 | |||
| 39 | $this->publishes([ |
||
| 40 | __DIR__.'/../config/faithgen-events.php' => config_path('faithgen-events.php'), |
||
| 41 | ], 'faithgen-events-config'); |
||
| 42 | |||
| 43 | Event::observe(EventObserver::class); |
||
| 44 | Guest::observe(GuestObserver::class); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get the Blogg route group configuration array. |
||
| 49 | * |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | private function routeConfiguration() |
||
|
0 ignored issues
–
show
|
|||
| 53 | { |
||
| 54 | return [ |
||
| 55 | 'prefix' => config('faithgen-events.prefix'), |
||
| 56 | 'middleware' => config('faithgen-events.middlewares'), |
||
| 57 | ]; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Register any application services. |
||
| 62 | * |
||
| 63 | * @return void |
||
| 64 | */ |
||
| 65 | public function register() |
||
| 66 | { |
||
| 67 | $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events'); |
||
| 68 | |||
| 69 | $this->app->singleton(EventsService::class); |
||
| 70 | $this->app->singleton(GuestService::class); |
||
| 71 | } |
||
| 72 | } |
||
| 73 |
This check looks for private methods that have been defined, but are not used inside the class.