@extends('layout.app') @section('content')

{{$title}}


@if (isset($doc)) {!! Form::model($doc, array('url' => url('category/'.$doc->id), 'method' => 'put', 'files'=> true,'id'=>'fvalidate')) !!} @else {!! Form::open(array('url' => route('category.store'), 'method' => 'post', 'files'=> true,'id'=>'fvalidate')) !!} @endif
{!! Form::label('name', 'Tên danh mục', array('class' => ' required')) !!} {!! Form::text('name',null, array('class' => 'form-control', 'required' => true)) !!} {{ $errors->first('name', ':message') }}
@if (isset($doc))
{!! Form::label('code', 'Mã nhóm', array('class' => ' required')) !!} {!! Form::text('code',null, array('class' => 'form-control', 'required' => true,'readonly'=>true)) !!} {{ $errors->first('name', ':message') }}
@endif
{!! Form::label('parent_id','Danh mục cha') !!} {!! Form::select('parent_id',$category_pluck, @$doc->parent_id, array('class' => 'form-control select2')) !!} {{ $errors->first('parent_id', ':message') }}
{!! Form::label('price', 'Giá công KTV') !!} {!! Form::text('price',@number_format($doc->price), array('class' => 'form-control price', 'required' => true)) !!} {{ $errors->first('price', ':message') }}
{!! Form::label('avatar', 'Ảnh thumbnail') !!}
@if (isset($doc)) image @endif
{{ Form::close() }}
@endsection @section('_script') @endsection