<?php $__env->startSection('title', 'Edit Press Releases'); ?>

<?php $__env->startSection('content'); ?>
<div class="card">

    <div class="card-body">
        <div class="card-title"></div>
        <form action="<?php echo e(route('blogs.update', ['blog' => $blog->id])); ?>" method="post" enctype="multipart/form-data">
            <?php echo method_field('patch'); ?>
            <?php echo csrf_field(); ?>
            <fieldset>
                <legend>Edit Press Releases</legend>
                <?php if($errors->any()): ?>
                <div class="alert alert-danger">
                <?php echo implode('', $errors->all('<div>:message</div>')); ?>

                </div>
                <?php endif; ?>
                <div class="row mb-3">
                    <div class="col-sm-12 mb-3">
                        <label class="form-label">Title</label>
                        <input type="text" name="title" value="<?php echo e($blog->title); ?>" require class="form-control">
                    </div>
                    <div class="col-sm-12 mb-3">
                        <label class="form-label">Category</label>
                        <select name="category_id"  require class="form-control">
                            <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($category->id); ?>"  <?php echo e($blog->category_id === $category->id ? 'selected' : ''); ?>><?php echo e($category->name); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                    <div class="col-sm-12 mb-3">
                        <label class="form-label">Publish Date</label>
                        <input type="date" name="publish_date" value="<?php echo e($blog->publish_date); ?>" require class="form-control">
                    </div>
                    <div class="col-sm-12 mb-3">
                        <label class="form-label">Thumbnail</label>
                        <input type="file" name="image" value="" require class="form-control">
                    </div>
                    <div class="col-sm-12 mb-3">
                        <label class="form-label">Meta Title</label>
                        <input type="text" name="meta[title]" value="<?php echo e($blog->meta_data->title); ?>" require
                            class="form-control">
                    </div>
                    <div class="col-sm-12 mb-3">
                        <label class="form-label">Meta Description</label>
                        <input type="text" name="meta[description]" value="<?php echo e($blog->meta_data->description); ?>" require
                            class="form-control">
                    </div>
                    <div class="col-sm-12 mb-3">
                        <label class="form-label">Meta Keyword</label>
                        <input type="text" name="meta[keyword]" value="<?php echo e($blog->meta_data->keyword); ?>"
                            class="form-control">
                    </div>
                    <div class="col-sm-12 mb-3">
                        <label class="form-label">Blog</label>
                        <textarea name="description" id="editor" class="form-control"></textarea>
                    </div>
                </div>
            </fieldset>
            <button type="submit" class="btn btn-primary">Update</button>
        </form>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('extra'); ?>
<script>
    $(document).ready(function () {
        $('#editor').summernote()
        $('#editor').summernote('code', '<?php echo $blog->description; ?>')
        var noteBar = $('.note-toolbar');
        noteBar.find('[data-toggle]').each(function () {
            $(this).attr('data-bs-toggle', $(this).attr('data-toggle')).removeAttr('data-toggle');
        });
    })
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/codexxatester/public_html/resources/views/admin/blog/edit.blade.php ENDPATH**/ ?>