toddy15/spamdetect

View on GitHub
src/SpamDetectServiceProvider.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

declare(strict_types=1);

namespace Toddy15\SpamDetect;

use Illuminate\Support\ServiceProvider;

class SpamDetectServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'spamdetect');
        $this->app->bind('spamdetect', function ($app) {
            return new SpamDetect();
        });
    }

    public function boot(): void
    {
        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
        $this->publishes([
            __DIR__.'/../config/config.php' => config_path('spamdetect.php'),
        ]);
    }
}