@if (request('action') == 'create') {!! Form::open(['route' => 'vendors.store']) !!} {!! FormField::text('name', ['required' => true]) !!} {!! FormField::text('website') !!} {!! FormField::textarea('notes') !!} {!! Form::submit(__('vendor.create'), ['class' => 'btn btn-success']) !!} {{ link_to_route('vendors.index', __('app.cancel'), [], ['class' => 'btn btn-default']) }} {!! Form::close() !!} @endif @if (request('action') == 'edit' && $editableVendor) {!! Form::model($editableVendor, ['route' => ['vendors.update', $editableVendor->id], 'method' => 'patch']) !!} {!! FormField::text('name', ['required' => true]) !!} {!! FormField::text('website') !!} {!! FormField::radios('is_active', [__('app.in_active'), __('app.active')]) !!} {!! FormField::textarea('notes') !!} @if (request('q')) {{ Form::hidden('q', request('q')) }} @endif @if (request('page')) {{ Form::hidden('page', request('page')) }} @endif {!! Form::submit(__('vendor.update'), ['class' => 'btn btn-success']) !!} {{ link_to_route('vendors.index', __('app.cancel'), [], ['class' => 'btn btn-default']) }} @can('delete', $editableVendor) {!! link_to_route( 'vendors.index', __('app.delete'), ['action' => 'delete', 'id' => $editableVendor->id] + request(['page', 'q']), ['id' => 'del-vendor-' . $editableVendor->id, 'class' => 'btn btn-danger pull-right'] ) !!} @endcan {!! Form::close() !!} @endif @if (request('action') == 'delete' && $editableVendor)

{{ __('vendor.delete') }}

{{ $editableVendor->name }}

{!! $errors->first('vendor_id', ':message') !!}

@can('delete', $editableVendor)
{{ __('app.delete_confirm') }}
@else
{{ __('vendor.undeleteable') }}
@endcan
@endif