fixing Laravel controller flash message

This commit is contained in:
Brian 2022-08-24 11:20:44 -06:00
parent 3b6285a359
commit baf5d5c8c7
Signed by: brian
GPG Key ID: DE1A5390A3B84CD8

View File

@ -60,7 +60,7 @@ public function update(Request \$request, ${1:Model} \$${4:model})
return redirect()->route('dashboard.${3:models}.index')->with('status', "Successfully updated {\$${4:model}->${5:field}}."); return redirect()->route('dashboard.${3:models}.index')->with('status', "Successfully updated {\$${4:model}->${5:field}}.");
} }
\$request->session()->flash('flash', ['bannerStyle' => 'danger', 'banner' => "Unable to update ${4:model}."]); \$request->session()->flash('flash', ['bannerStyle' => 'danger', 'banner' => "Unable to update {\$${4:model}->${5:field}}."]);
return redirect()->back()->with('error', "Unable to update {\$${4:model}->${5:field}}."); return redirect()->back()->with('error', "Unable to update {\$${4:model}->${5:field}}.");
} }