Set tags keyword field with array

This commit is contained in:
Christopher C. Wells 2021-03-05 14:50:54 -08:00
parent 2e7c76cbad
commit 8feb7b37fa
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ final class Food extends Model
{ {
return [ return [
'name' => $this->name, 'name' => $this->name,
'tags' => $this->tags->pluck('name')->implode(','), 'tags' => $this->tags->pluck('name')->toArray(),
'detail' => $this->detail, 'detail' => $this->detail,
'brand' => $this->brand, 'brand' => $this->brand,
'source' => $this->source, 'source' => $this->source,

View File

@ -112,7 +112,7 @@ final class Recipe extends Model
{ {
return [ return [
'name' => $this->name, 'name' => $this->name,
'tags' => $this->tags->pluck('name')->implode(','), 'tags' => $this->tags->pluck('name')->toArray(),
'description' => $this->description, 'description' => $this->description,
'source' => $this->source, 'source' => $this->source,
'created_at' => $this->created_at, 'created_at' => $this->created_at,