first commit

This commit is contained in:
Romulus21
2026-05-26 10:48:10 +02:00
commit f51ff75eec
6 changed files with 7750 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace Rodev\DelegateAuth\Console;
use Illuminate\Console\Command;
class InstallCommand extends Command
{
protected $signature = 'delegate-auth:install';
protected $description = 'Publie la configuration de delegate-auth';
public function handle(): void
{
$this->callSilent('vendor:publish', [
'--provider' => 'Rodev\\DelegateAuth\\DelegateAuthServiceProvider',
'--tag' => 'delegate-auth-config',
]);
$this->info('Config publiée dans config/delegate-auth.php');
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Rodev\DelegateAuth;
use Illuminate\Support\ServiceProvider;
class DelegateAuthServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->mergeConfigFrom(
__DIR__.'/../config/delegate-auth.php', 'delegate-auth'
);
}
public function boot(): void
{
$this->publishes([
__DIR__.'/../config/delegate-auth.php' => config_path('delegate-auth.php'),
], 'delegate-auth-config');
if ($this->app->runningInConsole()) {
$this->commands([
Console\InstallCommand::class,
]);
}
}
}