Skip to content

Commit

Permalink
Support laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
ziming committed Mar 9, 2024
1 parent b01e91f commit e400a7f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
include:
- laravel: 10.*
testbench: 8.*
carbon: ^2.63
- laravel: 11.*
testbench: 9.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,24 @@ LaravelEmailSniperLink::getSniperLinkQuick('[email protected]', 'optional-from-

// This will do a more accurate guess by not only checking the ending email address but also the MX record of the email address
// if the email address domain is not 1 of the common ones.
// Which is more useful for business emails. But it does make network calls to fetch the MX records so it is slower
// Which is more useful for business emails. But it does make network calls to fetch the MX records, so it is a little slower
LaravelEmailSniperLink::getSniperLink('[email protected]', '[email protected]')
```

The `LaravelEmailSniperLink` class has more static methods as well which might be useful for you.

Some helper functions are also available. For now there are 2. `email_sniper_link_quick(string $receiverEmail, ?string $fromEmail = null)` and `email_sniper_link(string $receiverEmail, ?string $fromEmail = null)`.
Some helper functions are also available. For now there are 2.

```php
// This just do a quick guess based on the ending email address such as gmail.com, outlook.com, icloud.com etc.
email_sniper_link_quick(string $receiverEmail, ?string $fromEmail = null);

// This will do a more accurate guess by not only checking the ending email address but also the MX record of the email address
// if the email address domain is not 1 of the common ones.
// Which is more useful for business emails. But it does make network calls to fetch the MX records, so it is a little slower
email_sniper_link(string $receiverEmail, ?string $fromEmail = null);

```

## Testing

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
],
"require": {
"php": "^8.1",
"illuminate/contracts": "^10.0",
"illuminate/contracts": "^10.0|^11.0",
"mobiledetect/mobiledetectlib": "^4.8",
"spatie/laravel-package-tools": "^1.14.0"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.8",
"larastan/larastan": "^2.0.1",
"orchestra/testbench": "^8.8",
"orchestra/testbench": "^8.8|^9.0",
"pestphp/pest": "^2.20",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
Expand Down

0 comments on commit e400a7f

Please sign in to comment.