Deprecate singleOrNew(), we use firstOrNew() instead

This commit is contained in:
2024-11-12 21:03:47 +11:00
parent 24144de193
commit 521a9b0679
3 changed files with 3 additions and 13 deletions

View File

@@ -120,7 +120,7 @@ class Address extends Model
// Check Domain exists
Domain::unguard();
$do = Domain::singleOrNew(['name'=>$ftn['d']]);
$do = Domain::firstOrNew(['name'=>$ftn['d']]);
Domain::reguard();
if (! $do->exists) {
@@ -143,7 +143,7 @@ class Address extends Model
// Create zone
Zone::unguard();
$zo = Zone::singleOrNew(['domain_id'=>$do->id,'zone_id'=>$ftn['z']]);
$zo = Zone::firstOrNew(['domain_id'=>$do->id,'zone_id'=>$ftn['z']]);
Zone::reguard();
if (! $zo->exists) {