Support the ongoing development of Laravel.io →
Blade Views

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?

Last updated 3 years ago.
0

I solved the problem using the famous command :

~ Blade::setEchoFormat('e(utf8_encode(%s))'); ~

0

Sign in to participate in this thread!

Eventy

Your banner here too?

unpatrice unpatrice Joined 4 Feb 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.