app/Jobs/ImportProfession.php: Import description.
This commit is contained in:
parent
b06cf18f51
commit
389a22ff38
1 changed files with 12 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue