@extends('admin.layouts.template') @section('page_heading','Update') @section('content')
.
@if($tech->type === '2')
อุปกรณ์
{!! Form::model($tech,array('route'=>['tech.update',$tech->id],'method'=>'PUT','novalidate' => 'novalidate','files' => true)) !!}
{!! Form::label('name','ชื่อ') !!} {!! Form::text('name',null,['class'=>'form-control']) !!}
{!! Form::label('model','รุ่น') !!} {!! Form::text('model',null,['class'=>'form-control']) !!}
{!! Form::label('tech_spec','สเปค') !!} {!! Form::text('tech_spec',null,['class'=>'form-control']) !!}
{!! Form::label('amount','จำนวน') !!} {!! Form::text('amount',null,['class'=>'form-control']) !!}
{!! Form::label('ma_cost',' ค่าซ่อมบำรุง') !!} บาท/ต่อปี
{!! Form::label('tech_location',' สถานที่ตั้ง') !!} {!! Form::select('tech_location',[''=>''] + $tt, null, ['class' => 'form-control datar']) !!}
{!! Form::label('brand','ยี่ห้อ') !!} {!! Form::select('brand', [''=>''] + $dd, null, ['class' => 'form-control datar']) !!}
{!! Form::label('owner','เจ้าของ/ผู้ดูแล') !!} {!! Form::text('owner',null,['class'=>'form-control']) !!}
{!! Form::label('remark',' รายละเอียด') !!} {!! Form::textarea('remark',null,['class'=>'form-control']) !!}
@if ($tech->file) {!! Form::label('file','Specification') !!}

{!! Form::file('file',null,['class'=>'form-control']) !!} @else

No Specification

{!! Form::label('file','Specification') !!}
{!! Form::file('file',null,['class'=>'form-control']) !!} {!! Form::hidden('type','2',['class'=>'form-control']) !!} @endif
@else
เครื่องแม่ข่าย
{!! Form::model($tech,array('route'=>['tech.update',$tech->id],'method'=>'PUT','novalidate' => 'novalidate','files' => true)) !!}
{!! Form::label('name','ชื่อ') !!} {!! Form::text('name',null,['class'=>'form-control']) !!}
{!! Form::label('model','รุ่น') !!} {!! Form::text('model',null,['class'=>'form-control']) !!}
{!! Form::label('tech_spec','สเปค') !!} {!! Form::text('tech_spec',null,['class'=>'form-control']) !!}
{!! Form::label('amount','จำนวน') !!} {!! Form::text('amount',null,['class'=>'form-control']) !!}
{!! Form::label('operating_system','ระบบปฏิบัติการ') !!} {!! Form::text('operating_system',null,['class'=>'form-control']) !!}
{!! Form::label('cpu_use','ซีพียูที่ใช้') !!} {!! Form::text('cpu_use',null,['class'=>'form-control']) !!}
{!! Form::label('memory_total',' เมมโมรี่ทั้งหมด') !!} GB
{!! Form::label('memory_used','เมมโมรี่ที่ใช้') !!} GB
{!! Form::label('hardisk_total','หน่วนความจำที่มี') !!} GB
{!! Form::label(' hardisk_used',' หน่วนความจำที่ใช้') !!} GB
{!! Form::label('ma_cost',' ค่าซ่อมบำรุง') !!} บาท/ต่อปี
{!! Form::label('tech_location',' สถานที่ตั้ง') !!} {!! Form::select('tech_location',[''=>''] + $tt, null, ['class' => 'form-control datar']) !!}
{!! Form::label('brand','ยี่ห้อ') !!} {!! Form::select('brand', [''=>''] + $dd, null, ['class' => 'form-control datar']) !!}
{!! Form::label('owner','เจ้าของ/ผู้ดูแล') !!} {!! Form::text('owner',null,['class'=>'form-control']) !!}
{!! Form::label('remark',' รายละเอียด') !!} {!! Form::textarea('remark',null,['class'=>'form-control']) !!}
@if ($tech->file) {!! Form::label('file','Specification') !!}

{{$tech->file}}

{!! Form::file('file',null,['class'=>'form-control']) !!}

@else

No Specification

{!! Form::label('file','Specification') !!}
{!! Form::file('file',null,['class'=>'form-control']) !!} {!! Form::hidden('type','1') !!}

@endif {!! Form::label('','ระบบสารสนเทศ') !!}
ระบบสารสนเทศ
@foreach($aps as $a) @endforeach
ชื่อ ลบ
{{ $a->name}}

เพิ่มความสัมพันธ์ระบบสารสนเทศ
@endif {!! Form::hidden('app2', null,['id' => 'app2']) !!} {!! Form::hidden('bus2', null,['id' => 'bus2']) !!} {!! Form::hidden('tech2', null,['id' => 'tech2']) !!}
{!! Form::button('บันทึก',['type'=>'submit','class'=>'btn btn-primary','id'=>'add1']) !!} {{ link_to_route('tech.index','ย้อนกลับ',null,['class'=>'btn btn-danger']) }}
{!! Form::close() !!}
@if($errors->any())
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@stop