Answers for "message bag laravel"

PHP
7

laravel success message

return redirect()->back()->with('message', 'IT WORKS!');

Displaying message if it exists:

@if(session()->has('message'))
    <div class="alert alert-success">
        {{ session()->get('message') }}
    </div>
@endif
Posted by: Guest on March-22-2020
0

with message in laravel

@if (\Session::has('success'))
    <div class="alert alert-success">
        <ul>
            <li>{!! \Session::get('success') !!}</li>
        </ul>
    </div>
@endif
Posted by: Guest on June-22-2021
0

with message in laravel

return redirect()->back()->with('success', 'your message,here');
Posted by: Guest on June-22-2021

Browse Popular Code Answers by Language