在laravel 5.6中如何检查特定的id是否有密码?

I want to check whether the particular id has password or not.

view user fuction in controller

public function viewUser(){
    $users = User::orderBy('user_id','ASC')->get();
    return view('admin.user.view_user')->with(compact('users'));
}

in viewuser.blade.php

 <div class="container">

   <div class="modal fade" id="myModal" role="dialog">
            <div class="modal-dialog">

           <div class="modal-content">
                  <div class="modal-header">
               <button type="button" class="close" data-dismiss="modal">&times;</button>
                          <h4 class="modal-title">Actual Password</h4>
                        </div>
                        <div class="modal-body">
                          <p><?php if(!empty($User->actual_password)) echo "Actual Password:"." $User->actual_password " ; else echo "No Password" ?></p>
                        </div>
                        <div class="modal-footer">
                          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>

but its not working

Please check the password not to be hidden in the model

protected $hidden = ['password', 'remember_token' ];

actual_password !? Did you select the field name yourself? if no! change it "password"

You can use php in the blade as follows

    @if($user->actual_password == null)
       <p>your text..</p> 
    @else
       <p>Actual Password: {{ $user->actual_password }}</p>
    @endif

Note that variables are case sensitive so $User is not equal to $user