<?php $__env->startSection('content'); ?>
    <body class="fix-header fix-sidebar card-no-border">

    <div id="main-wrapper">
        <div class="page-wrapper customWrap">

            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <?php if($friends->isEmpty()): ?>
                            <h1>No Friends
                                <h1>
                                    <?php else: ?>
                                        <div class="card privacy-policy">
                                            <div class="card-header">Friends</div>
                                            <div class="crdBody main-frndpg">
                                                <div class="srch-frnd">
                                                    <form class="search" action="<?php echo e(route('dashboard.friends')); ?>"
                                                          method="get">
                                                        <?php echo csrf_field(); ?>
                                                        <span>
                                        <input type="text" placeholder="Search Friends" name="search" value="">
                                        <button type="submit"><i class="fa fa-search"
                                                                 aria-hidden="true"></i>Search</button>
                                    </span>
                                                    </form>
                                                </div>
                                                <?php $__currentLoopData = $friends; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $friend): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <?php if($friend->receiver_id != Auth::id()): ?>
                                                        <div class="row">
                                                            <div class="col-md-6 col-lg-6">
                                                                <div class="">
                                                                    <div class="row frnd-box">
                                                                        <div class="col-md-8 col-lg-8">
                                                                            <div class="frnd-img">
                                                                                <img
                                                                                    src="<?php echo e($friend->profile_image ? asset('profile_image/'.$friend->profile_image) : asset('profile_image/user.png')); ?>"
                                                                                    width="70" class="img-fluid"
                                                                                    alt="img">
                                                                                <div class="frnd-txt">
                                                                                    <h2><?php echo e($friend->receiver->name ?? ''); ?></h2>
                                                                                    <h3>Friend</h3>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-md-4 col-lg-4">
                                                                            <form
                                                                                action="<?php echo e(route('create.chat.room')); ?>"
                                                                                method="POST">
                                                                                <?php echo csrf_field(); ?>
                                                                                <input type="hidden" name="receiver_id" value="<?php echo e($friend->receiver_id); ?>">

                                                                                <button
                                                                                    class="btn btn-success p-r-30 p-l-30">
                                                                                    <i class="fas fa-cloud"></i>
                                                                                    Say Hi!!
                                                                                </button>
                                                                            </form>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    <?php else: ?>
                                                        <div class="row">
                                                            <div class="col-md-6 col-lg-6">
                                                                <div class="">
                                                                    <div class="row frnd-box">
                                                                        <div class="col-md-8 col-lg-8">
                                                                            <div class="frnd-img">
                                                                                <img
                                                                                    src="<?php echo e($friend->profile_image ? asset('profile_image/'.$friend->profile_image) : asset('profile_image/user.png')); ?>"
                                                                                    width="70" class="img-fluid"
                                                                                    alt="img">
                                                                                <div class="frnd-txt">
                                                                                    <h2><?php echo e($friend->sender->name); ?></h2>
                                                                                    <h3>Friend</h3>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-md-4 col-lg-4">
                                                                            <form
                                                                                action="<?php echo e(route('create.chat.room')); ?>"
                                                                                method="POST">
                                                                                <?php echo csrf_field(); ?>
                                                                                <input type="hidden" name="receiver_id" value="<?php echo e($friend->sender_id); ?>">
                                                                                <button
                                                                                    class="btn btn-success p-r-30 p-l-30">
                                                                                    <i class="fas fa-cloud"></i>
                                                                                    Say Hi!!
                                                                                </button>
                                                                            </form>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    <?php endif; ?>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                        </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.dashboard-app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/servicedemoweb/public_html/global-man-cave/resources/views/dashboard/friends.blade.php ENDPATH**/ ?>