loadViewsFrom(__DIR__ . '/../../resources/views', 'auto'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'auto'); // 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('lavalite.auto', function ($app) { return $this->app->make('Lavalite\Auto\Auto'); }); // Bind Manufacturer to repository $this->app->bind( 'Lavalite\Auto\Interfaces\ManufacturerRepositoryInterface', \Lavalite\Auto\Repositories\Eloquent\ManufacturerRepository::class ); // Bind Car to repository $this->app->bind( 'Lavalite\Auto\Interfaces\CarRepositoryInterface', \Lavalite\Auto\Repositories\Eloquent\CarRepository::class ); // Bind Automodel to repository $this->app->bind( 'Lavalite\Auto\Interfaces\AutomodelRepositoryInterface', \Lavalite\Auto\Repositories\Eloquent\AutomodelRepository::class ); // Bind Body to repository $this->app->bind( 'Lavalite\Auto\Interfaces\BodyRepositoryInterface', \Lavalite\Auto\Repositories\Eloquent\BodyRepository::class ); $this->app->register(\Lavalite\Auto\Providers\AuthServiceProvider::class); $this->app->register(\Lavalite\Auto\Providers\RouteServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['lavalite.auto']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('lavalite/auto.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/auto')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/auto')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }