davy_yg
3 years ago
17976
9
Laravel

Can you write dd(); in the view ?

Posted 3 years ago by davy_yg

Can you write dd(); in the view ? I wonder how to dump variable in view?

   <ul id="w1" class="navbar-nav pull-right nav">
            @if(Auth::check())

                {{ dd($user); }}
                <li>
                    <h4 class="welcome-txt">Welcome <i class="welcome-username">{{$user['full_name']}} !</i></h4>
                </li>

I get an error: {{ dd($user); }}

Parse error: syntax error, unexpected ';', expecting ',' or ')' (View: C:\xampp\htdocs\soulfy_repo\framework\resources\views\home.blade.php) (View: C:\xampp\htdocs\soulfy_repo\framework\resources\views\home.blade.php)

Please sign in or create an account to participate in this conversation.