laravel version 5.1.28
-- route.php ---
Route::get('/w2', function () {
$taskName=DB::table('tasks')->where("id" , 34)->pluck('name');
var_dump($taskName);
return view('w2', [
'taskName' => $taskName
]);
});
--- w2.blade.php ---
<!DOCTYPE html>
<html>
<body>
<div class="container">
<div class="content">
<div class="title">Laravel 5</div>
<h4>{{ $taskName }}</h4>
</div>
</div>
</body>
</html>
DISPLAYED BELOW
<body>string(6) "énigme"
<div class="container">
<div class="content">
<div class="title">Laravel 5</div>
<h4></h4></div>
</div>
</body>
We can see the value "énigme" which is printed at first coming from var_dump but nothing is printed in the blade view !?
Someone else has already seen that?
I solved the problem using the famous command :
~ Blade::setEchoFormat('e(utf8_encode(%s))'); ~
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community