Question: I have this route in web.php:

```
Route::get('student/evaluation/{evaluation}', [EvaluationController::class, 'getEvaluationQuestions'])->middleware('auth')->name('student.questionsevaluation');

```

And in my controller I have this condition, where $questionWasCompleted is boolean

```
if($questionWasCompleted){

return redirect()->route('student.questionsevaluation', $evaluation)
->with('message', 'Question answered.')
->with('question', $questionWasCompleted);

}

```

How can I get the value of $questionWasAnswered to know if it's true or false in the view file?

I tried with {{$questionWasCompleted}} in view file but it not works.

Answer: 
with method of redirect() obj saves the key in session of requested user
so in your blade file you can access it like this :

```
{{  session('question') }}

```

Also notice that first argument of with() method ( for example 'message') is the key and the second argument is ( for example 'Question answered.') is your value , for accessing the value you should use the key in your blade file .
first of all check if your view file is in blade format (example: view.blade.php) then try {{ $question }}