Add all files
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace Paymenter\Extensions\Others\UptimeLab\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Livewire\Livewire;
|
||||
use Paymenter\Extensions\Others\UptimeLab\Livewire\Uptime\Index;
|
||||
use Paymenter\Extensions\Others\UptimeLab\Console\Commands\CheckUptimeCommand;
|
||||
use Paymenter\Extensions\Others\UptimeLab\Console\Commands\TestUptimeCommand;
|
||||
|
||||
class UptimeLabServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
// Load routes
|
||||
$this->loadRoutesFrom(__DIR__ . '/../routes/web.php');
|
||||
|
||||
// Load views
|
||||
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'uptime');
|
||||
|
||||
// Load language files
|
||||
$this->loadTranslationsFrom(__DIR__ . '/../lang', 'uptime');
|
||||
|
||||
// Register Livewire components
|
||||
Livewire::component('uptime.index', Index::class);
|
||||
|
||||
// Register console commands
|
||||
if ($this->app->runningInConsole()) {
|
||||
$this->commands([
|
||||
CheckUptimeCommand::class,
|
||||
TestUptimeCommand::class,
|
||||
]);
|
||||
}
|
||||
|
||||
// Publish assets if needed
|
||||
$this->publishes([
|
||||
__DIR__ . '/../resources/views' => resource_path('views/vendor/uptime'),
|
||||
], 'uptime-views');
|
||||
|
||||
$this->publishes([
|
||||
__DIR__ . '/../lang' => resource_path('lang/vendor/uptime'),
|
||||
], 'uptime-lang');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user