PHP Classes

File: resources/views/blogs/edit.blade.php

Recommend this page to a friend!
  Classes of Akinshola Samuel AKINDE   Laravel MongoDB CRUD Blog   resources/views/blogs/edit.blade.php   Download  
File: resources/views/blogs/edit.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Laravel MongoDB CRUD Blog
Blog that uses CRUD record operations with MongoDB
Author: By
Last change:
Date: 8 months ago
Size: 2,288 bytes
 

Contents

Class file image Download
@extends('blogs.layout')


@section('content')
    <div class="row">
        <div class="col-lg-12 margin-tb">
            <div class="pull-left">
                <h2>Edit Book</h2>
            </div>
            <div class="pull-right">
                <a class="btn btn-primary" href="{{ route('blog.index') }}"> Back</a>
            </div>
        </div>
    </div>


    @if ($errors->any())
        <div class="alert alert-danger">
            <strong>Whoops!</strong> There were some problems with your input.<br><br>
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif


    <form action="{{ route('blog.update',$blog->id) }}" method="POST">
        @csrf
        @method('PUT')


        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <div class="form-group">
                    <strong>Title:</strong>
                    <input type="text" name="title" value="{{ $blog->title }}" class="form-control" placeholder="Title">
                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-12">
                <div class="form-group">
                    <strong>SLUG:</strong>
                    <input type="text" name="slug" value="{{ $blog->slug }}" class="form-control" placeholder="Slug">
                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-12">
                <div class="form-group">
                    <strong>Image URL:</strong>
                    <input type="text" name="image" value="{{ $blog->image }}" class="form-control" placeholder="Image URL">
                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-12">
                <div class="form-group">
                    <strong>Content:</strong>
                    <textarea class="form-control" style="height:150px" name="content" placeholder="Content">{{ $blog->content }}</textarea>
                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-12 text-center">
                <button type="submit" class="btn btn-primary">Submit</button>
            </div>
        </div>


    </form>


@endsection