Remove redundant tables and code

This commit is contained in:
Deon George
2021-06-25 13:43:55 +10:00
parent 066154f310
commit bd85f8b055
22 changed files with 44 additions and 857 deletions

View File

@@ -1,32 +0,0 @@
<?php
namespace App\Traits;
use App\Models\Zone;
trait ParseNodes
{
/**
* Parse a seenby or path list and return node models
*/
protected function parse_nodes(Zone $zo,string $line,$create=TRUE)
{
$net = FALSE;
$result = collect();
foreach (explode(' ',$line) as $node)
{
if (preg_match('#/#',$node))
{
list($net,$node) = preg_split('#/#',$node);
}
if (! $net)
throw new \Exception('Missing Net?',$node);
$result->push($this->get_node(['z'=>$zo->id,'n'=>$net,'f'=>$node,'p'=>0],$create));
}
return $result;
}
}