[PR #47] [CLOSED] Add ability to filter by record type #50

Closed
opened 2026-02-27 23:20:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spatie/dnsrecords.io/pull/47
Author: @casperboone
Created: 10/15/2018
Status: Closed

Base: masterHead: filter-by-type


📝 Commits (1)

  • b2f94d5 Add ability to filter by record type

📊 Changes

3 files changed (+67 additions, -4 deletions)

View changed files

📝 app/Services/Commands/Commands/DnsLookup.php (+30 -3)
📝 app/Services/Commands/Commands/Manual.php (+1 -0)
📝 tests/Feature/DnsLookupTest.php (+36 -1)

📄 Description

This PR adds the ability to filter the DNS records list by type.

Examples of input are spatie.be A or spatie.be A MX.

For now I've copied the list of supported record types from Spatie\Dns\Dns to the DnsLookup class since it's not accessible. I will propose a change to spatie/dns for this in that repo.

The tests have become a bit more concrete. I don't think the extra assumptions I made will be an issue (A, NS and SOA records should always exist), but wanted to mention this explicitly.

I'm not sure what's the best 'look' for the URLs yet. Currently it's just https://dnsrecords.io/spatie.be mx. An alternative would be https://dnsrecords.io/spatie.be/mx, however when multiple filtering rules are applied this would become something like https://dnsrecords.io/spatie.be/mx/ns which does not make much sense in my opinion. Ideas about this are welcome :)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spatie/dnsrecords.io/pull/47 **Author:** [@casperboone](https://github.com/casperboone) **Created:** 10/15/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `filter-by-type` --- ### 📝 Commits (1) - [`b2f94d5`](https://github.com/spatie/dnsrecords.io/commit/b2f94d565888bcd3b6c10fe21ee66a267f629a09) Add ability to filter by record type ### 📊 Changes **3 files changed** (+67 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `app/Services/Commands/Commands/DnsLookup.php` (+30 -3) 📝 `app/Services/Commands/Commands/Manual.php` (+1 -0) 📝 `tests/Feature/DnsLookupTest.php` (+36 -1) </details> ### 📄 Description This PR adds the ability to filter the DNS records list by type. Examples of input are `spatie.be A` or `spatie.be A MX`. For now I've copied the list of supported record types from `Spatie\Dns\Dns` to the `DnsLookup` class since it's not accessible. I will propose a change to [spatie/dns](https://github.com/spatie/dns) for this in that repo. The tests have become a bit more concrete. I don't think the extra assumptions I made will be an issue (A, NS and SOA records should always exist), but wanted to mention this explicitly. I'm not sure what's the best 'look' for the URLs yet. Currently it's just `https://dnsrecords.io/spatie.be mx`. An alternative would be `https://dnsrecords.io/spatie.be/mx`, however when multiple filtering rules are applied this would become something like `https://dnsrecords.io/spatie.be/mx/ns` which does not make much sense in my opinion. Ideas about this are welcome :) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 23:20:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dnsrecords.io#50
No description provided.