@extends('Backend.layouts.app') @section('content') {{-- @dd($errors) --}} @if(isset($edit)) {!! Form::open(['route' => ['category.update',$edit->id],'method'=>'PUT','data-parsley-validation'=> '']) !!} @else {!! Form::open(['route' => ['category.store'],'method'=>'POST','data-parsley-validation'=> '']) !!} @endif
@if(isset($edit))
{!! Form::label('name','Name:') !!} {!! Form::text('name', $edit->name,array('class' => 'form-control','required'=>'','maxlength'=>'20')) !!} @error('name')
{{$message}}
@enderror
{!! Form::label('sort','Sort:') !!} {!! Form::number('sort', $edit->sort,array('class' => 'form-control','required'=>'','maxlength'=>'20')) !!} @error('sort')
{{$message}}
@enderror
{!! Form::label('description','Description:') !!} {!! Form::textarea('description',$edit->description,array('class' =>'form-control','required'=>'')) !!}
status ? 'checked' : ''}} @else checked @endif >
@else
{!! Form::label('name','Name:') !!} {!! Form::text('name', null,array('class' => 'form-control','required'=>'','maxlength'=>'20')) !!} @error('name')
{{$message}}
@enderror
{!! Form::label('sort', 'Sort:') !!} {!! Form::number('sort', null,array('class' => 'form-control','required'=>'')) !!} @error('sort')
{{$message}}
@enderror
{!! Form::label('description','Description:') !!} {!! Form::textarea('description',null,array('class' =>'form-control','required'=>'')) !!}
@endif
Actions
  • @if (isset($edit)) @else @endif
{!! Form::close() !!} @endsection