@extends('Backend.layouts.app') @section('content') {{-- @dd($errors) --}} @if(isset($edit)) {!! Form::open(['route' => ['blog.update',$edit->id],'method'=>'PUT','data-parsley-validation'=> '','files' => true]) !!} @else {!! Form::open(['route' => ['blog.store'],'method'=>'POST','data-parsley-validation'=> '','files' => true]) !!} @endif
@if(isset($edit)) {!! Form::label('title','Title:') !!} {!! Form::text('title',$edit->title,array('class' => 'form-control','required'=>'')) !!}
{!! Form::label('category_id','Category Name:') !!} {!! Form::select('category_id', $category,$edit->category_id,array('class' =>'form-control','required'=>'')); !!} {!! Form::label('author','Author:') !!} {!! Form::text('author',$edit->author,array('class' => 'form-control','required'=>'','maxlength'=>'20')) !!} {!! Form::label('featuredImage','Upload Featured Image:') !!} {!! Form::file('featuredImage',array('class'=>'form-control')) !!} @else {!! Form::label('title','Title:') !!} {!! Form::text('title', null,array('class' => 'form-control','required'=>'')) !!} {!! Form::label('category_id','Category Name:') !!} {!! Form::select('category_id', $category , '1',array('class' =>'form-control','required'=>'')); !!} {!! Form::label('featuredImage','Upload Featured Image:') !!} {!! Form::file('featuredImage',array('class'=>'form-control'))!!} {!! Form::label('author','Author:') !!} {!! Form::text('author', null,array('class' => 'form-control','required'=>'','maxlength'=>'20')) !!} @endif
Actions
  • @if(isset($edit)) @else @endif
{!! Form::close() !!} @endsection