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

@@ -40,7 +40,7 @@ class Rescan extends Command
if (! $this->argument('area'))
throw new \Exception('Areaname is required');
$fao = Filearea::where('name',$this->argument('area'))->singleOrFail();
$fao = Filearea::where('name',$this->argument('area'))->sole();
if ($fao->domain_id !== $ao->zone->domain_id)
throw new \Exception(sprintf('File area [%s] is not in domain [%s] for FTN [%s]',$fao->name,$ao->zone->domain->name,$ao->ftn));