File: /home/armgroup/libs/storage/framework/views/74ee1a0cd9c6b148a51a83591dec94a66982b4f6.php
<?php $__env->startSection('content'); ?>
<div class="container my-5 body-content">
<div class="row">
<div class="col-lg-3 col-sm-12">
<?php echo $__env->make('account.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<div class="col-lg-9 col-sm-12">
<div class="card">
<h5 class="card-header"><?php echo e(__('Favorites')); ?>
<span class="float-end">
<form action="<?php echo e(route('account.favorites.index')); ?>"
id="favorite_form" method="GET">
<select name="type" id="favorite_type" class="form-control form-select">
<option value="">تمام علاقهمندیها</option>
<?php $__currentLoopData = \App\Models\Favorite::TYPE; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($type['show-name']); ?>"
<?php echo e(request('type') == $type['show-name'] ? 'selected' : ''); ?>>
<?php echo e($type['name']); ?>
</option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</form>
</span>
</h5>
<div class="card-body">
<table class="table table-sm">
<thead class="thead-dark">
<tr>
<th scope="col"><?php echo e(__('Title')); ?></th>
<th scope="col"><?php echo e(__('Date')); ?></th>
<th scope="col"><?php echo e(__('Actions')); ?></th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $favorites; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $favorite): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($favorite->favoritable?->{$favorite->getFavoriteType()['title']}); ?></td>
<td><?php echo e(jdate($favorite->created_at)); ?></td>
<td>
<form action="<?php echo e(route('account.favorites.destroy', $favorite->id)); ?>"
method="POST">
<?php echo csrf_field(); ?>
<?php echo method_field('DELETE'); ?>
<a href="<?php echo e(optional($favorite->favoritable)->url); ?>"
class="btn btn-secondary btn-sm"
target="_blank">
<span class="fa fa-eye"></span> <?php echo e($favorite->getFavoriteType()['show-name']); ?>
</a>
<button type="submit" class="btn btn-danger btn-sm">
<span class="fa fa-trash"></span> <?php echo e(__('Delete')); ?>
</button>
</form>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<?php echo e($favorites->links()); ?>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('footer'); ?>
<script>
$(document).ready(function() {
$('#favorite_type').on('change', function() {
$('#favorite_form').submit();
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/masomi/armshop/resources/views/account/favorites/index.blade.php ENDPATH**/ ?>