Skip to content

Commit

Permalink
fixtry: resolve pigeon message read issue
Browse files Browse the repository at this point in the history
remove auto update by making nullable
  • Loading branch information
arthaud-proust committed Oct 27, 2023
1 parent 40a1eff commit 82b5cb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/NewsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function store(StoreNewsRequest $request): RedirectResponse
*/
public function show(Request $request, News $news): Response
{
$request->user()->pigeon->news()->updateExistingPivot($news->id, ['is_read' => true]);
$request->user()->pigeon->news()->updateExistingPivot($news->id, ['is_read' => true], false);

return Inertia::render('News/Show', [
'news' => NewsData::from($news),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function up(): void
$table->id();
$table->foreignIdFor(News::class)->constrained();
$table->foreignIdFor(Pigeon::class)->constrained()->onDelete('cascade');
$table->timestamp('arrival_date');
$table->timestamp('arrival_date')->nullable();
$table->boolean('is_read')->default(false);
$table->timestamps();
});
Expand Down

0 comments on commit 82b5cb7

Please sign in to comment.