78 lines
2.5 KiB
PHP
78 lines
2.5 KiB
PHP
|
|
@extends('cms.cms-master')
|
|
@section('main_content')
|
|
@if ($errors -> any() )
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
<h1>Add New Product</h1>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<form action="{{url('cms/products')}}" method="post" enctype="multipart/form-data">
|
|
{{csrf_field()}}
|
|
<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>
|
|
@foreach ($categories as $value)
|
|
<option @if (old('categorie_id') == $value['id']) selected="selected" @endif value="{{$value['id']}}">{{$value['title']}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="title" class="form-label"><b>Title : </b></label>
|
|
<input value="{{ old('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="{{ old('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="{{ old('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="{{ old('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">{{old('body')}}</textarea>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="image" class="form-label"><b>Product Image :</b></label>
|
|
<input type="file" name="image" id="image" value="">
|
|
</div>
|
|
|
|
<div class="form-group text-center">
|
|
<a href="{{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>
|
|
|
|
@endsection
|