PHP Snippet 1:
$request->session()->flash('message', 'Categoria criada com sucesso!');
PHP Snippet 2:
Session::flash('message', 'Categoria criada com sucesso!');
PHP Snippet 3:
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
PHP Snippet 4:
@if(Session::has('message'))
<script>Materialize.toast({{ Session::get('message') }}, 4000)</script>
{{ Session::flush() }}
@endif
PHP Snippet 5:
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
PHP Snippet 6:
@session()->forget('message');