I want to send a variable from one route to another, to display this variable in the view, use example:
public function create(ExamRequest $request)
{
Exam::create( $request->all() );
$message = 'A avaliação "'.$request->input('name').'" foi registrada!';
return redirect()->route('exams')->withMessage($message);
}
The route exams
in my case calls a view
, and I try to display the parameter in the same way:
<div class="row text-success text-center">
{{ isset($message) ? $message : '' }}
</div>
But nothing ever appears, how can I send a parameter to another route?
PS: I know that with view works, example view('exams')->withMessage($message);
, but in case it does not change the browser link and I want this link to crash. p>