snipt

Ctrl+h for KB shortcuts

Text only

Flash Message

\Session::flash('success', "rows imported successfully.");
$request->session()->flash('danger', "There were $num_errors errors.");
https://snipt.net/embed/ae12ecf7b516246d961ed5eab8cef527/
/raw/ae12ecf7b516246d961ed5eab8cef527/
ae12ecf7b516246d961ed5eab8cef527
text
Text only
3
2024-05-20T03:08:49
True
False
False
Dec 18, 2017 at 11:52 PM
/api/public/snipt/18/
flash-message
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>\Session::flash(&#39;success&#39;, &quot;rows imported successfully.&quot;); </span><span id="L-2"><a name="L-2"></a>$request-&gt;session()-&gt;flash(&#39;danger&#39;, &quot;There were $num_errors errors.&quot;); </span></pre></div> </td></tr></table>
laravel
1
2
3
4
5
--- 
+++ 
@@ -0,0 +1,2 @@
+\Session::flash('success', "rows imported successfully.");
+$request->session()->flash('danger', "There were $num_errors errors.");