loadViewsFrom(__DIR__ . '/../../resources/views', 'timesheet'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'timesheet'); // Load migrations $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); // Call pblish redources function $this->publishResources(); } /** * Register the service provider. * * @return void */ public function register() { // Bind facade $this->app->bind('renfos.timesheet', function ($app) { return $this->app->make('Renfos\Timesheet\Timesheet'); }); // Bind Board to repository $this->app->bind( 'Renfos\Timesheet\Interfaces\BoardRepositoryInterface', \Renfos\Timesheet\Repositories\Eloquent\BoardRepository::class ); // Bind Column to repository $this->app->bind( 'Renfos\Timesheet\Interfaces\ColumnRepositoryInterface', \Renfos\Timesheet\Repositories\Eloquent\ColumnRepository::class ); // Bind Project to repository $this->app->bind( 'Renfos\Timesheet\Interfaces\ProjectRepositoryInterface', \Renfos\Timesheet\Repositories\Eloquent\ProjectRepository::class ); // Bind ProjectUser to repository $this->app->bind( 'Renfos\Timesheet\Interfaces\ProjectUserRepositoryInterface', \Renfos\Timesheet\Repositories\Eloquent\ProjectUserRepository::class ); // Bind Task to repository $this->app->bind( 'Renfos\Timesheet\Interfaces\TaskRepositoryInterface', \Renfos\Timesheet\Repositories\Eloquent\TaskRepository::class ); // Bind Timesheet to repository $this->app->bind( 'Renfos\Timesheet\Interfaces\TimesheetRepositoryInterface', \Renfos\Timesheet\Repositories\Eloquent\TimesheetRepository::class ); $this->app->register(\Renfos\Timesheet\Providers\AuthServiceProvider::class); $this->app->register(\Renfos\Timesheet\Providers\RouteServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['renfos.timesheet']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('renfos/timesheet.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/timesheet')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/timesheet')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }