toggle favorite inspiration working + tab my favorite
This commit is contained in:
parent
0a412d48a4
commit
0ee0181206
6 changed files with 41 additions and 14 deletions
|
|
@ -28,10 +28,10 @@ return [
|
|||
$array = $favoriteForUsers->toArray();
|
||||
$yaml = Data::encode($array, 'yaml');
|
||||
|
||||
$file->update([
|
||||
$newFile = $file->update([
|
||||
'favoriteForUsers' => $yaml
|
||||
]);
|
||||
|
||||
return json_encode('Image ' . $action . ' favoris de l\'utilisateur ' . $user->email() . '.');
|
||||
return json_encode($newFile->favoriteForUsers()->value());
|
||||
}
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue