mirror of https://github.com/kcal-app/kcal.git
Set tags keyword field with array
This commit is contained in:
parent
2e7c76cbad
commit
8feb7b37fa
|
@ -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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue