![]() 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/ProjectPlan/ |
<?php namespace Corals\Modules\ProjectPlan; use Corals\Modules\ProjectPlan\Facades\ProjectManager; use Corals\Modules\ProjectPlan\Facades\ProjectPlan; use Corals\Modules\ProjectPlan\Models\Project; use Corals\Modules\ProjectPlan\Notifications\ImporterStatusNotification; use Corals\Modules\ProjectPlan\Notifications\ProjectPendingApprovalNotification; use Corals\Modules\ProjectPlan\Notifications\SendProjectCrewMemberNotification; use Corals\Modules\ProjectPlan\Providers\ProjectPlanAuthServiceProvider; use Corals\Modules\ProjectPlan\Providers\ProjectPlanObserverServiceProvider; use Corals\Modules\ProjectPlan\Providers\ProjectPlanRouteServiceProvider; use Corals\Modules\Utility\Facades\Utility; use Corals\Settings\Facades\Settings; use Corals\User\Communication\Facades\CoralsNotification; use Illuminate\Foundation\AliasLoader; use Illuminate\Support\ServiceProvider; class ProjectPlanServiceProvider extends ServiceProvider { protected $defer = true; /** * Bootstrap the application events. * * @return void */ public function boot() { // Load view $this->loadViewsFrom(__DIR__ . '/resources/views', 'ProjectPlan'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'ProjectPlan'); // Load migrations // $this->loadMigrationsFrom(__DIR__ . '/database/migrations'); $this->registerCustomFieldsModels(); $this->registerEvents(); } /** * Register the service provider. * * @return void */ public function register() { $this->mergeConfigFrom(__DIR__ . '/config/projectPlan.php', 'projectPlan'); $this->app->register(ProjectPlanRouteServiceProvider::class); $this->app->register(ProjectPlanAuthServiceProvider::class); $this->app->register(ProjectPlanObserverServiceProvider::class); $this->app->booted(function () { $loader = AliasLoader::getInstance(); $loader->alias('ProjectPlan', ProjectPlan::class); $loader->alias('ProjectManager', ProjectManager::class); }); Utility::addToUtilityModules('ProjectPlan'); } protected function registerCustomFieldsModels() { Settings::addCustomFieldModel(Project::class); } /** * */ protected function registerEvents() { CoralsNotification::addEvent( 'notifications.project_plan.send_project_crew_notification', 'Crew Member Notification', SendProjectCrewMemberNotification::class, 'notifications.project_plan.send_project_crew_notification' ); CoralsNotification::addEvent( 'notifications.project_plan.project_pending_approval_notification', 'Project Pending Approval Notification', ProjectPendingApprovalNotification::class, 'notifications.project_plan.project_pending_approval_notification' ); CoralsNotification::addEvent( 'notifications.project_plan.import_status', 'File Import Status', ImporterStatusNotification::class, 'notifications.project_plan.import_status', 'Import File Status'); } }