Release inicial 1.0.0
This commit is contained in:
36
Providers/SatCatalogsServiceProvider.php
Normal file
36
Providers/SatCatalogsServiceProvider.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Koneko\SatCatalogs\Console\Commands\GenerateCsvFromXlsx;
|
||||
use Koneko\SatCatalogs\Console\Commands\ImportCsvToDatabase;
|
||||
|
||||
class SatCatalogsServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
// Register the module's routes
|
||||
$this->loadRoutesFrom(__DIR__.'/../routes/admin.php');
|
||||
|
||||
// Register the migrations
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
|
||||
|
||||
// Registrar comandos de consola
|
||||
if ($this->app->runningInConsole()) {
|
||||
$this->commands([
|
||||
GenerateCsvFromXlsx::class,
|
||||
ImportCsvToDatabase::class,
|
||||
]);
|
||||
}
|
||||
|
||||
// Publicar los archivos necesarios
|
||||
$this->publishes([
|
||||
__DIR__.'/../database/seeders/SatCatalogsSeeder.php' => database_path('seeders/SatCatalogsSeeder.php'),
|
||||
__DIR__.'/../database/seeders/sat_cache' => database_path('seeders/sat_cache'),
|
||||
], 'sat-catalogs-seeders');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user