Skip to content

Commit 3f48c75

Browse files
committed
docs: update Installation & Integration
1 parent e33a13e commit 3f48c75

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

README.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,47 @@
11
# sun-asterisk/laravel-domain-verify
22

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

5-
- [ ] Via domain's DNS record (txt record)
6-
- [ ] Via HTML tag
7-
- [ ] Via Adminstrator's email address. Supported: `[email protected]` and `[email protected]`.
5+
- [x] Via domain's DNS record
6+
- [x] Via HTML tag
7+
- [x] Via HTML file
8+
- [x] Via Adminstrator's email address: `[email protected]`, `[email protected]`.
89

910
## Installation
1011

1112
First, install Domain Verifier via the Composer package manager:
1213

1314
```bash
15+
# install this package:
1416
composer require sun-asterisk/laravel-domain-verify
15-
```
16-
17-
After that, you need to add provider `DomainVerifierServiceProvider` in `config/app.php`.
18-
Now, you should publish the Domain Verifier configuration and migration via `artisan` command:
1917

20-
```bash
18+
# create config/domain_verifier.php and:
2119
php artisan vendor:publish --provider="SunAsterisk\DomainVerifier\DomainVerifierServiceProvider"
20+
21+
# migrate database:
22+
php artisan migrate
2223
```
2324

24-
If you just want to publish only configuration or migrations:
25+
## Usage
2526

26-
```bash
27-
php artisan vendor:publish --provider="SunAsterisk\DomainVerifier\DomainVerifierServiceProvider" --tag=config
28-
php artisan vendor:publish --provider="SunAsterisk\DomainVerifier\DomainVerifierServiceProvider" --tag=migrations
27+
Integrate with your model.
28+
29+
```php
30+
<?php
31+
32+
namespace App\Models;
33+
34+
// ...
35+
use SunAsterisk\DomainVerifier\Contracts\Models\DomainVerifiable;
36+
use SunAsterisk\DomainVerifier\Traits\DomainVerifiable as DomainVerifiableTrait;
37+
use SunAsterisk\DomainVerifier\Models\DomainVerification;
38+
39+
class Website extends Model implements DomainVerifiable
40+
{
41+
use DomainVerifiableTrait;
42+
43+
//..
44+
}
2945
```
3046

3147
## Requirements

0 commit comments

Comments
 (0)