83 lines
No EOL
3.5 KiB
PHP
83 lines
No EOL
3.5 KiB
PHP
<?php $__env->startSection('main_content'); ?>
|
|
<?php if($errors -> any() ): ?>
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<li><?php echo e($error); ?></li>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?>
|
|
<h1>Edit Tis Product</h1>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<form action="<?php echo e(url('cms/products') .'/' . $product[0]->id); ?>" method="post" enctype="multipart/form-data">
|
|
<?php echo e(csrf_field()); ?>
|
|
|
|
<?php echo e(method_field('PUT')); ?>
|
|
|
|
<input type="hidden" name="item_id" value="<?php echo e($product[0] ->id); ?>">
|
|
<div class="form-group">
|
|
<label for="Categorie-id" class="form-label"><b>Category : </b></label>
|
|
<select class="form-control" name="categorie_id" id="categorie_id">
|
|
<option value="">Choose Category.....</option>
|
|
<?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<option <?php if( $product[0]->categorie_id == $value['id']): ?> selected="selected" <?php endif; ?> value="<?php echo e($value['id']); ?>"><?php echo e($value['title']); ?></option>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="title" class="form-label"><b>Title : </b></label>
|
|
<input value="<?php echo e($product[0]->title); ?>" id="title" name="title" type="text" class="origin_text form-control">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="url" class="form-label"><b>Url :</b></label>
|
|
<input value="<?php echo e($product[0]->url); ?>" id="url" name="url" type="text" class="target-text form-control">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="price" class="form-label"><b>Price :</b></label>
|
|
<input value="<?php echo e($product[0]->price); ?>" id="price" name="price" type="text" class="form-control">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="stock" class="form-label"><b>Stock :</b></label>
|
|
<input value="<?php echo e($product[0]->stock); ?>" id="stock" name="stock" type="text" class="form-control">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="sale">On Sale?</label>
|
|
<select class="form-control" name="sale">
|
|
<option value="0">No</option>
|
|
<option value="1">Yes</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="body" class="form-label"><b>Body : </b></label>
|
|
<textarea placeholder="Say Somthing Good" id="article" class="form-control" name="body" rows="8" cols="80"><?php echo $product[0]->body; ?></textarea>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<img width="100" src="<?php echo e(asset('images'.'/' . $product[0] ->image)); ?>" alt="">
|
|
<label for="image" class="form-label"><b>Change Product Image :</b></label>
|
|
<input type="file" name="image" id="image" value="">
|
|
</div>
|
|
|
|
<div class="form-group text-center">
|
|
<a href="<?php echo e(url('cms/products')); ?>" class="btn btn-default">Cancel</a>
|
|
<button type="submit" class="btn btn-primary"><i class="icon-profile"></i> Save Page </button>
|
|
</div>
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
<?php echo $__env->make('cms.cms-master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
|