Skip to content

Commit

Permalink
Merge pull request #132 from Thomas-More-Digital-Innovation/sva-delet…
Browse files Browse the repository at this point in the history
…e_news

Fixed error when deleting news
  • Loading branch information
SiebeCamerman authored Dec 30, 2023
2 parents cf2c964 + ed202c1 commit d1ded49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/webapp/app/Http/Controllers/NewsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ public function destroy($id)
Gate::authorize("allowAdmin");

$new = Info::find($id);
$news_content = InfoContent::where('info_id', $id);
$news_content->delete();
$new->delete();

$msg = "New Info Content Deleted successful! ";
Expand Down

0 comments on commit d1ded49

Please sign in to comment.