helper function added

This commit is contained in:
2019-05-30 00:55:48 -05:00
parent 2d800082b2
commit e59d49af03
2 changed files with 5 additions and 4 deletions

View File

@@ -95,6 +95,8 @@ class ProcessStructureJob implements ShouldQueue
*/
public function handle()
{
$sHelper = new StructureHelper;
//Get the page of structures
$structures = $this->GetListOfStructures();
@@ -113,9 +115,9 @@ class ProcessStructureJob implements ShouldQueue
//Find if the structure exists
$found = Structure::where(['structure_id' => $structure->structure_id])->get();
if(!$found) {
$this->StoreNewStructure($structure, $info, $solarName);
$sHelper->StoreNewStructure($structure, $info, $solarName);
} else {
$this->UpdateExistingStructure($structure, $info, $solarName);
$sHelper->UpdateExistingStructure($structure, $info, $solarName);
}
}
}

View File

@@ -5,7 +5,7 @@
* GNU Public License
*/
namespace App\Library\Structures\Helper;
namespace App\Library\Structures;
//Internal Library
use Log;
@@ -17,7 +17,6 @@ use App\Models\Structure\Structure;
use App\Models\Structure\Service;
class StructureStockHelper {
public function StoreNewStructure($structure, $info, $solarName) {