v0.9.2 - Added send notifications

This commit is contained in:
frederikpyt
2020-08-12 15:26:32 +02:00
parent e06504b5fb
commit fff03fd131
3 changed files with 49 additions and 9 deletions
@@ -138,13 +138,13 @@ class MenuPlanController extends Controller
$menuPlans = MenuPlan::query()->paginate($request->input("limit", 20));
if($request->newsoption == true){
$news = new News();
$news = [
"name" => "Opdateret menuplan",
"subname" => "Uge " . $menuplan->week,
"content" => $menuplan->menu
];
$news->name = "Opdateret menuplan";
$news->subname = "Uge " . $menuplan->week;
$news->content = $menuplan->menu;
$news->save();
NewsController::storeAndGet($news);
}
return redirect()->route("menu-plans.index", ['menuPlans' => $menuPlans]);