![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/dceprojects.corals.io/Corals/modules/Survey/ |
<?php namespace Corals\Modules\Survey; use Corals\Modules\Survey\Facades\Surveys; use Corals\Modules\Survey\Notifications\SendSurveySubmissionNotification; use Corals\Modules\Survey\Providers\SurveyAuthServiceProvider; use Corals\Modules\Survey\Providers\SurveyObserverServiceProvider; use Corals\Modules\Survey\Providers\SurveyRouteServiceProvider; use Corals\User\Communication\Facades\CoralsNotification; use Illuminate\Foundation\AliasLoader; use Illuminate\Support\ServiceProvider; class SurveyServiceProvider extends ServiceProvider { protected $defer = true; /** * Bootstrap the application events. * * @return void */ public function boot() { // Load view $this->loadViewsFrom(__DIR__ . '/resources/views', 'Survey'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Survey'); // Load migrations // $this->loadMigrationsFrom(__DIR__ . '/database/migrations'); $this->registerCustomFieldsModels(); \Assets::add(asset('assets/modules/survey/css/survey.css')); $this->registerEvents(); } /** * Register the service provider. * * @return void */ public function register() { $this->mergeConfigFrom(__DIR__ . '/config/survey.php', 'survey'); $this->app->register(SurveyRouteServiceProvider::class); $this->app->register(SurveyAuthServiceProvider::class); $this->app->register(SurveyObserverServiceProvider::class); $this->app->booted(function () { $loader = AliasLoader::getInstance(); $loader->alias('Surveys', Surveys::class); }); } protected function registerCustomFieldsModels() { } protected function registerEvents() { CoralsNotification::addEvent( 'notifications.survey.survey_submitted', 'Survey Member Notification', SendSurveySubmissionNotification::class, 'notifications.survey.survey_submitted' ); } }