Eshop-Laravel/resources/views/cms/cms-add-content.blade.php

58 lines
1.5 KiB
PHP
Raw Permalink Normal View History

2019-10-18 09:25:37 +00:00
@extends('cms.cms-master')
@section('main_content')
<h1>Add New 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')}}" method="post">
{{csrf_field()}}
<div class="form-group">
<label for="menu-link">Menu Links : </label>
<select id="menu-link" class="form-control" name="menu_id">
<option value="">Choose menu Link....</option>
@foreach ($menu as $item)
<option @if ( old('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="{{ old('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">{{old('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> Save Content </button>
</div>
</form>
</div>
</div>
@endsection