Skip to content

Instantly share code, notes, and snippets.

@evercode1
Created February 11, 2017 07:01
Show Gist options
  • Select an option

  • Save evercode1/e0eeaa9ad49f24e345fb5956e44d49a5 to your computer and use it in GitHub Desktop.

Select an option

Save evercode1/e0eeaa9ad49f24e345fb5956e44d49a5 to your computer and use it in GitHub Desktop.
chapter 25 create.blade.php
@extends('layouts.master')
@section('title')
<title>Create a Category</title>
@endsection
@section('content')
<ol class='breadcrumb'>
<li><a href='/'>Home</a></li>
<li><a href='/category'>Categories</a></li>
<li class='active'>Create</li>
</ol>
<h2>Create a New Category</h2>
<hr/>
<form class="form" role="form" method="POST" action="{{ url('/category') }}">
{{ csrf_field() }}
<!-- Category Name Form Input -->
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label class="control-label">Category Name</label>
<input type="text" class="form-control" name="name" value="{{ old('name') }}">
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-lg">
Create
</button>
</div>
</form>
@endsection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment