Skip to content

Commit

Permalink
service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
devsrv committed May 1, 2021
1 parent 046338a commit 066c62b
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions src/LivewireModalServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

namespace devsrv\LivewireModal;

use Illuminate\Support\ServiceProvider;
use Livewire\Livewire;
use devsrv\LivewireModal\Http\Livewire\Modal as WireModal;
use devsrv\LivewireModal\Components\{
Base,
ModalBase,
Trigger,
};
use devsrv\LivewireModal\Components\UI\{
Modal,
Spinner,
Alertify
};

class LivewireModalServiceProvider extends ServiceProvider
{
public function boot()
{
Livewire::component('base-wire-modal', WireModal::class);

$this->loadViewsFrom(__DIR__.'/../resources/views', 'livewiremodal');

$this->loadViewComponentsAs('livewiremodal', [
Base::class,
Spinner::class,
Alertify::class,
Modal::class,
Trigger::class,
ModalBase::class,
]);

$this->publishes([
__DIR__.'/../public/dist' => public_path('vendor/livewiremodal'),
], 'public');
}

/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}

0 comments on commit 066c62b

Please sign in to comment.