Laravel Auth

PHP MIT

Laravel Auth by GhostCompiler adds advanced authentication for Laravel with TOTP 2FA, passkeys via WebAuthn, OTP channels (email, SMS, WhatsApp), trusted devices, and tenant-aware social login.

Stars
2
Forks
0
Downloads
N/A
Open Issues
0
Files main

Repository Files

Loading file structure...
src/Console/PublishOtpAssetsCommand.php
<?php

declare(strict_types=1);

namespace GhostCompiler\LaravelAuth\Console;

use Illuminate\Console\Command;

class PublishOtpAssetsCommand extends Command
{
    protected $signature = 'laravel-auth:otp:publish {--force : Overwrite published OTP assets}';

    protected $description = 'Publish LaravelAuth OTP templates and transport stubs';

    public function handle(): int
    {
        $this->components->info('Publishing LaravelAuth OTP views...');

        $this->call('vendor:publish', array_filter([
            '--tag' => 'laravel-auth-views',
            '--force' => $this->option('force') ? true : null,
        ]));

        $this->newLine();
        $this->components->info('Publishing LaravelAuth OTP transport stubs...');

        $this->call('vendor:publish', array_filter([
            '--tag' => 'laravel-auth-stubs',
            '--force' => $this->option('force') ? true : null,
        ]));

        $this->newLine();
        $this->components->info('OTP assets published.');

        return 0;
    }
}