Deprecate singleOrFail() in favour of sole()

This commit is contained in:
2024-11-08 23:31:21 +11:00
parent f0f2d74a14
commit 72ad1307c5
18 changed files with 27 additions and 43 deletions

View File

@@ -38,7 +38,7 @@ class TestNodeHierarchy extends Seeder
]);
foreach (['a','b'] as $domain) {
$do = Domain::where('name',$domain)->singleOrFail();
$do = Domain::where('name',$domain)->sole();
$this->hierarchy($do,100);
$this->hierarchy($do,101);
}
@@ -84,7 +84,7 @@ class TestNodeHierarchy extends Seeder
'updated_at'=>Carbon::now(),
]);
$zo = Zone::where('zone_id',$zoneid)->where('domain_id',$domain->id)->singleOrFail();
$zo = Zone::where('zone_id',$zoneid)->where('domain_id',$domain->id)->sole();
if (self::DEBUG)
dump(['zo'=>$zo->zone_id,'rid'=>0,'hid'=>0,'nid'=>0]);