@extends('layouts.app') @section('content-header')
@if(!$terminal->id) {{ Breadcrumbs::render('terminals-form', 'Create new', '') }}

Create Terminal

@else {{ Breadcrumbs::render('terminals-form', $terminal->mac, $terminal->id) }}

Edit Terminal

@endif
@endsection @section('content') @if(!$terminal->id) {!! Form::model($terminal, [ 'method' => 'POST', 'route' => ['terminals.store'], 'role' => 'form'])!!} @else {!! Form::model($terminal, [ 'method' => 'PUT', 'route' => ['terminals.update', $terminal->id], 'role' => 'form'])!!} @endif
@if (count($errors) > 0)
Whoops! There were some problems with your input.

    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if ($message = Session::get('fail'))
Whoops! There were some problems with your input.

{{ $message }}
@endif
{!! Form::label('lblName', 'Mac Address') !!} {!! Form::text('txtMac', $terminal->mac, ['class' => 'form-control', 'placeholder' => 'aa-bb-cc-dd-ee-ff']) !!} @if ($errors->has('txtMac'))

{{$errors->first('txtMac')}}

@endif
{!! Form::label('lblDesc', 'Description') !!} {!! Form::text('txtDesc', $terminal->desc, ['class' => 'form-control', 'placeholder' => 'Description']) !!}
{!! Form::submit('Submit', ['class' => 'btn btn-primary'])!!} {!! link_to_route('terminals.index', 'Cancel', null, ['class' => 'btn btn-danger']) !!}
{!! Form::close() !!} @endsection @include('_components.scripts.form')