<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>

    <?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([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal2a2e454b2e62574a80c8110e5f128b60)): ?>
<?php $component = $__componentOriginal2a2e454b2e62574a80c8110e5f128b60; ?>
<?php unset($__componentOriginal2a2e454b2e62574a80c8110e5f128b60); ?>
<?php endif; ?>

    <div class="bradcam_area bradcam_bg_1">
        <div class="container">
            <div class="row">
                <div class="col-xl-12">
                    <div class="bradcam_text">

                        <?php if(Auth::user() && Auth::user()->id == $user->id): ?>
                        <h3>Личный кабинет</h3>
                        <?php else: ?>
                        <h3>Пользователь: <?php echo e($user->name); ?></h3>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="container mt-5 mb-5">
        <div class="row">
            <div class="col-md-8 offset-md-2">
                <div class="card">
                    <div class="card-header text-center">
                        <?php if(Route::is('user')): ?>
                        <?php if(Auth::user() && Auth::user()->id == $user->id): ?>
                        <h3>Мой профиль</h3>
                        <?php else: ?>
                        <h3>Профиль пользователя: <?php echo e($user->name); ?></h3>
                        <?php endif; ?>
                        <?php endif; ?>

                        <?php if(Route::is('edit_user')): ?>
                        <h3>Редактирование профиля</h3>
                        <?php endif; ?>
                    </div>
                    <?php if(Route::is('user')): ?>
                    <div class="card-body">
                        <div class="row">
                            <div class="col-md-4">
                                <img src="public/<?php echo e($user->avatar); ?>" class="img-fluid rounded-circle" alt="Avatar">
                            </div>
                            <div class="col-md-8">
                                <h4>Имя: <?php echo e($user->name); ?></h4>
                                <h4>Почта: <?php echo e($user->email); ?></h4>
                                <h4 class="mt-4">О себе:</h4>
                                <p><?php echo e($user->comment); ?></p>
                                <h4 class="mt-4">Дата создания аккаунта: <?php echo e($user->created_at); ?></h4>
                                <?php if(Auth::user() && Auth::user()->role == 'admin' || Auth::user() && Auth::user()->id == $user->id): ?>
                                <a href="<?php echo e(Route('edit_user', $user->id)); ?>" class="btn btn-primary mt-4">Изменить</a>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                    <?php endif; ?>
                    <?php if(Route::is('edit_user')): ?>
                    <div class="card-body">
                        <form action="<?php echo e(Route('edituser', $user->id)); ?>" method="post" class="registration_form" enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            <div class="form-row">
                                <div class="form-group col-md-6">
                                    <label for="name">Имя</label>
                                    <input type="text" class="form-control" id="nameEdit" name="nameEdit" placeholder="Введите имя" value="<?php echo e($user->name); ?>">
                                </div>
                                <div class="form-group col-md-6">
                                    <label for="email">Почта</label>
                                    <input type="email" class="form-control" id="emailEdit" name="emailEdit" placeholder="Введите почту" value="<?php echo e($user->email); ?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="comment">О себе</label>
                                <textarea type="text" class="form-control" id="commentEdit" cols="30" rows="10" name="commentEdit" placeholder="Введите информацию о себе" ><?php echo e($user->comment); ?></textarea>
                            </div>
                            <?php $__errorArgs = ["resumeEdit"];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="alert alert-danger">Давай пиши чё-то</div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            <div class="form-group">
                                <label for="avatar">Аватар</label>
                                <input type="file" class="form-control-file" id="avatar" name="avatar">
                            </div>
                            <button type="submit" class="btn btn-success">Изменить</button>
                        </form>
                    </div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>

    <?php if (isset($component)) { $__componentOriginal8a8716efb3c62a45938aca52e78e0322 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.footer','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('footer'); ?>
<?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($__componentOriginal8a8716efb3c62a45938aca52e78e0322)): ?>
<?php $component = $__componentOriginal8a8716efb3c62a45938aca52e78e0322; ?>
<?php unset($__componentOriginal8a8716efb3c62a45938aca52e78e0322); ?>
<?php endif; ?>

    <?php if (isset($component)) { $__componentOriginal23a21c0d0f80992980c57ef2802ca540 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.scripts','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('scripts'); ?>
<?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($__componentOriginal23a21c0d0f80992980c57ef2802ca540)): ?>
<?php $component = $__componentOriginal23a21c0d0f80992980c57ef2802ca540; ?>
<?php unset($__componentOriginal23a21c0d0f80992980c57ef2802ca540); ?>
<?php endif; ?>
</body>

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