Eshop-Laravel/resources/views/cms/cms-edit-categories.blade.php
2019-10-18 12:25:37 +03:00

54 lines
1.7 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>Edit Category -</h1>
<div class="row">
<div class="col-md-6">
<form action="{{url('cms/categories/' . $categories[0]->id )}}" method="post" enctype="multipart/form-data">
{{csrf_field()}}
{{ method_field('PUT') }}
<input type="hidden" name="item_id" value="{{ $categories[0]->id }}">
<div class="form-group">
<label for="title" class="form-label"><b>Title : </b></label>
<input value="{{ $categories[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="{{$categories[0]->url}}" id="url" name="url" type="text" class="target-text form-control">
</div>
<div class="form-group">
<label for="article" class="form-label"><b>Article : </b></label>
<textarea placeholder="Say Somthing Good" id="article"class="form-control" name="article" rows="8" cols="80">{{$categories[0]->article}}</textarea>
</div>
<div class="form-group">
<img width="100" src="{{ asset('images').'/' . $categories[0]->image }}" alt="">
<br>
<label for="image" class="form-label"><b>Change Category Image :</b></label>
<input type="file" name="image" id="image" value="">
</div>
<div class="form-group text-center">
<a href="{{url('cms/categories')}}" 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