laravel-vuexy-store-manager/Providers/VuexyStoreManagerServiceProvider.php
2025-03-05 20:43:35 -06:00

57 lines
1.5 KiB
PHP

<?php
namespace Koneko\VuexyStoreManager\Providers;
use Illuminate\Support\ServiceProvider;
use Livewire\Livewire;
use Koneko\VuexyStoreManager\Livewire\Company\CompanyIndex;
use Koneko\VuexyStoreManager\Livewire\Stores\{StoreIndex,StoreForm};
use Koneko\VuexyStoreManager\Livewire\WorkCenters\{WorkCenterOffcanvasForm,WorkCenterIndex};
use OwenIt\Auditing\AuditableObserver;
class VuexyStoreManagerServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
// Register the module's routes
$this->loadRoutesFrom(__DIR__.'/../routes/admin.php');
// Cargar vistas del paquete
$this->loadViewsFrom(__DIR__.'/../resources/views', 'vuexy-store-manager');
// Register the migrations
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
// Registrar Livewire Components
$components = [
'company-index' => CompanyIndex::class,
'store-index' => StoreIndex::class,
'store-form' => StoreForm::class,
'work-center-index' => WorkCenterIndex::class,
'work-center-offcanvas-form' => WorkCenterOffcanvasForm::class,
];
foreach ($components as $alias => $component) {
Livewire::component($alias, $component);
}
// Registrar auditoría en usuarios
//User::observe(AuditableObserver::class);
}
}