sun-asterisk/laravel-domain-verify

Verify domain ownership for Laravel application

v1.0.0 2020-10-02 03:44 UTC

This package is auto-updated.

Last update: 2024-11-11 10:23:06 UTC


README

Verify domain ownership for the Laravel application. We provide three ways to verify the domain ownership (like Google):

  • Via domain's DNS record
  • Via HTML tag
  • Via HTML file
  • Via Adminstrator's email address: admin@domain.example, webmaster@domain.example.

Installation

First, install Domain Verifier via the Composer package manager:

# install this package:
composer require sun-asterisk/laravel-domain-verify

# create config/domain_verifier.php and:
php artisan vendor:publish --provider="SunAsterisk\DomainVerifier\DomainVerifierServiceProvider"

# migrate database:
php artisan migrate

Usage

Integrate with your model.

<?php

namespace App\Models;

// ...
use SunAsterisk\DomainVerifier\Contracts\Models\DomainVerifiable;
use SunAsterisk\DomainVerifier\Traits\DomainVerifiable as DomainVerifiableTrait;
use SunAsterisk\DomainVerifier\Models\DomainVerification;

class Website extends Model implements DomainVerifiable
{
    use DomainVerifiableTrait;

    //..
}

Requirements

  • Laravel >= 5.6.0