<?php $__env->startSection('content'); ?>
<main class="content">
    <div class="container-fluid p-0">

        <div class="row mb-2 mb-xl-3">
            <div class="col-auto d-none d-sm-block">
                <h3><strong>Create</strong> Review</h3>
            </div>

            <div class="col-auto ms-auto text-end mt-n1">
                <a href="<?php echo e(route('all.review')); ?>" class="btn btn-primary">All Review</a>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    
                    <div class="card-body">
                        <form method="POST" action="<?php echo e(route('store.review')); ?>" enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            <div class="mb-3">
                                <label class="form-label">Reviewer Name</label>
                                <input type="text" class="form-control" placeholder="Reviewer Name" name="reviewer_name">
                            </div>
                            <div class="mb-3">
                                <label class="form-label">Review Text</label>
                                <textarea class="form-control" placeholder="Review Text" name="review_text" rows="3"></textarea>
                            </div>
                            <div class="mb-3">
                                <input type="file" onChange="reviewerImageUrl(this)" name="photo">
                                <img src="" alt="" class="rounded-circle" id="reviewerImage">
                            </div>
                            <button type="submit" class="btn btn-primary">Create</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>

    </div>
</main>
<script>
    function reviewerImageUrl(input){
        if(input.files && input.files[0]){
            var reader = new FileReader();
            reader.onload = function(e){
                $('#reviewerImage').attr('src',e.target.result).width(80).height(80);
            };
            reader.readAsDataURL(input.files[0]);
        }
    }
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('backend.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/kreditoh/public_html/agri_stock/resources/views/backend/review/create_review.blade.php ENDPATH**/ ?>