1
0
Fork 0

app/Jobs/ImportProfession.php: Import description.

This commit is contained in:
Henrik Hautakoski 2021-07-08 14:08:31 +02:00
parent b06cf18f51
commit 389a22ff38

View file

@ -173,12 +173,20 @@ class ImportProfession implements ShouldQueue
$recipe = $profession->recipes()->create([
'item_id' => $crafted ? $crafted->id : null,
'spell_id' => $spell->id,
'category_id' => $category->id
'category_id' => $category->id,
'description' => isset($data->description) ? $data->description : null
]);
}
// Update with crafted item :)
else if ($crafted) {
$recipe->craft()->associate($crafted);
// Update record
else {
if ($crafted) {
$recipe->craft()->associate($crafted);
}
if ($recipe->description === NULL && isset($data->description)) {
$recipe->description = $data->description;
}
}
// Insert/Update Reagents