<html>
<?php if (isset($component)) { $__componentOriginal0f509fab02c45445826003a1e50db506 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.head','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('head'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal0f509fab02c45445826003a1e50db506)): ?>
<?php $component = $__componentOriginal0f509fab02c45445826003a1e50db506; ?>
<?php unset($__componentOriginal0f509fab02c45445826003a1e50db506); ?>
<?php endif; ?>

<body class="body">
    <?php if (isset($component)) { $__componentOriginal2a2e454b2e62574a80c8110e5f128b60 = $component; } ?>
<?php $component = App\View\Components\Header::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('header'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Header::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['ab' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($ab)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal2a2e454b2e62574a80c8110e5f128b60)): ?>
<?php $component = $__componentOriginal2a2e454b2e62574a80c8110e5f128b60; ?>
<?php unset($__componentOriginal2a2e454b2e62574a80c8110e5f128b60); ?>
<?php endif; ?>

    <div class="main">
        <div class="container">
            <div class="trf">
                <li>
                    <h3>Тарифы</h3>
                    <?php if(Auth::user() && Auth::user()->role == 'admin'): ?>
                    <a href="<?php echo e(Route('addtariff')); ?>">Добавить тариф</a>
                    <?php endif; ?>
                </li>
                <div class="tariffs">
                    <?php $__currentLoopData = $trfs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $trf): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <section class="tariff">
                        <li>
                            <p><?php echo e($trf->name); ?></p>
                            <p><?php echo e($trf->sprice); ?> руб. / сек.</p>
                            <div class="trfed">
                            <?php if(Auth::user()): ?>
                                <?php if(Auth::user()->role == 'admin'): ?>
                                <a href="<?php echo e(Route('edit_tariff', $trf->id)); ?>"><button class="but">Изменить</button></a>
                                <?php if(Auth::user()->role == 'admin' && $trf->id != 1): ?>
                                <a href="<?php echo e(Route('delete_tariff', $trf->id)); ?>"><button class="but">Удалить</button></a>
                                <?php endif; ?>
                                <?php else: ?>
                                    <?php if(Auth::user()->role == 'user' && $ab->tariff_id != $trf->id): ?> 
                                    <a href="<?php echo e(Route('tariff', $trf->id)); ?>"><button class="but">Подключить</button></a>
                                    <?php elseif(Auth::user()->role == 'admin' && $trf->id != 1): ?>
                                    <p>Подключено</p>
                                    <?php endif; ?>
                                <?php endif; ?>
                            <?php else: ?>
                            <a href="<?php echo e(Route('login')); ?>"><button class="but">Подключить</button></a>
                            <?php endif; ?>
                            </div>
                        </li>
                    </section>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </div>
    </div>
</body>

</html><?php /**PATH C:\xampp\htdocs\ms_laravel\resources\views/index.blade.php ENDPATH**/ ?>