Deprecate singleOrNew(), we use firstOrNew() instead
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user