Last active
February 12, 2017 22:24
-
-
Save evercode1/d630f95c8c0e25a00a5d0f50dcf77e1e to your computer and use it in GitHub Desktop.
chapter 15 lesson/create.blade.php revised
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.master') | |
@section('title') | |
<title>Create a Lesson</title> | |
@endsection | |
@section('content') | |
<ol class='breadcrumb'> | |
<li><a href='/'>Home</a></li> | |
<li><a href='/lesson'>Lessons</a></li> | |
<li class='active'>Create</li> | |
</ol> | |
<h2>Create a New Lesson</h2> | |
<hr/> | |
<form class="form" role="form" method="POST" action="{{ url('/lesson') }}"> | |
{{ csrf_field() }} | |
<!-- lesson name Form Input --> | |
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> | |
<label class="control-label">Lesson 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> | |
<lesson-create-category | |
:categories="{{ json_encode($categories) }}" | |
:subcategories="{{ json_encode($subcategories) }}"> | |
</lesson-create-category> | |
<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