Answers for "message system 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

laravel flash message

public function create(Request $request){    return redirect()->route('home')        ->with('error','You have no permission for this page!');}
Posted by: Guest on October-29-2020

Browse Popular Code Answers by Language