


<?php $__env->startSection('content'); ?>

<div class="container mt-4">
    <a href="<?php echo e(route('products.index')); ?>" class="btn btn-primary">Back</a>
    <div class="row">
        <form action="<?php echo e(route('products.store')); ?>" method="post" enctype="multipart/form-data">
            <?php echo csrf_field(); ?>

            <div class="mt-3">
                <label for="name">Product Name:</label>
                <input type="text" placeholder="Enter Product Name" name="name" id="name" class="form-control" required>
            </div>
            <div class="mt-3">
                <label for="image">Categories:</label>

                <select name="category_id" class="form-control" required>
                    <option value="">--Select Category--</option>
                    <?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($category->name); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                </select>
            </div>
            <div class="mt-3">
                <label for="image">Brands:</label>

                <select name="brand_id" class="form-control" required>
                    <option value="">--Select Brand--</option>
                    <?php $__currentLoopData = $brands; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $brand): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($brand->id); ?>"><?php echo e($brand->name); ?></option>

                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
            <div class="mt-3">
                <label for="price">Product Price:</label>
                <input type="number" name="price" id="price" class="form-control" required>
            </div>
            <div class="mt-3">
                <label for="Stock">Stock:</label>
                <input type="number" name="stock" id="stock" class="form-control" required>
            </div>
            <div class="mt-3">
                <label for="image">Image:</label>
                <input type="file" name="image" id="image" class="form-control" required>
            </div>
            <div class="mt-3">
                <label for="Stock">Description:</label>
                <textarea name="description" id="description" class="form-control" rows="5"></textarea>
            </div>
            <br>
            <button type="submit" class="btn btn-dark">Add Product</button>


        </form>
    </div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.dashboard', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\khruk\Desktop\ecommerce\megastore\resources\views/dashboard/products/create.blade.php ENDPATH**/ ?>