54 lines
1.5 KiB
PHP
54 lines
1.5 KiB
PHP
|
|
@extends('cms.cms-master')
|
|
@section('main_content')
|
|
<h1>Edit Content</h1>
|
|
@if ($errors -> any() )
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
|
|
@endif
|
|
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<form action="{{url('cms/content') .'/'. $content[0] ->id}}" method="post">
|
|
{{csrf_field()}}
|
|
{{method_field('PUT')}}
|
|
<div class="form-group">
|
|
<label for="menu-link">Menu Links : </label>
|
|
<select id="menu-link" class="form-control" name="menu_id">
|
|
@foreach ($menu as $item)
|
|
<option @if ( $content[0]->menu_id == $item['id'] ) selected="selected" @endif value="{{$item['id']}}">{{$item['link']}}</option>
|
|
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="title" class="form-label">Title : </label>
|
|
<input value="{{ $content[0]->title }}" id="title" name="title" type="text" class="form-control">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="article" class="form-label">Article : </label>
|
|
<textarea placeholder="Say Somthing Good" id="article"class="form-control" name="article" rows="8" cols="80">{{$content[0]->article}}</textarea>
|
|
</div>
|
|
|
|
<div class="form-group text-center">
|
|
<a href="{{url('cms/content')}}" class="btn btn-default">Cancel</a>
|
|
<button type="submit" class="btn btn-primary"><i class="icon-profile"></i> Update Content </button>
|
|
</div>
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|