How to return view with flash message?
问题 What i need is this: return view('protected.standardUser.includes.documents',compact('documents'))->with('successMsg','Property is updated .'); The i could use it like this: @if(Session::has('successMsg')) <div class="alert alert-success"> {{ Session::get('successMsg') }}</div> @endif Any suggestion? 回答1: It looks like you're mixing two different ways of passing data to a view, which I'm guessing is the problem. The documentation seems to indicate it's a one or the other type situation. You