Created
February 13, 2017 00:18
-
-
Save evercode1/5d98307c52a10f3336ca34b0df0e076f to your computer and use it in GitHub Desktop.
chapter 15 lesson/edit.blade.php
This file contains 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>Edit Lesson</title> | |
@endsection | |
@section('content') | |
<ol class='breadcrumb'> | |
<li><a href='/'>Home</a></li> | |
<li><a href='/lesson'>Lessons</a></li> | |
<li><a href='/lesson/{{$lesson->id}}'>{{$lesson->name}}</a></li> | |
<li class='active'>Edit</li> | |
</ol> | |
<h1>Edit Lesson</h1> | |
<hr/> | |
<form class="form" role="form" method="POST" action="{{ url('/lesson/'. $lesson->id) }}"> | |
{{ method_field('PATCH') }} | |
{{ 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="{{ $lesson->name }}"> | |
@if ($errors->has('name')) | |
<span class="help-block"> | |
<strong>{{ $errors->first('name') }}</strong> | |
</span> | |
@endif | |
</div> | |
<lesson-edit-category :category="{{ json_encode($category) }}" | |
:categories="{{ json_encode($categories) }}" | |
:subcategory="{{ json_encode($subcategory) }}" | |
:subcategories="{{ json_encode($subcategories) }}" | |
></lesson-edit-category> | |
<div class="form-group"> | |
<button type="submit" class="btn btn-primary btn-lg"> | |
Edit | |
</button> | |
</div> | |
</form> | |
@include('errors.list') | |
@endsection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment