@if(isset($id)) {{ html()->modelForm($data, 'PATCH', route('document.update', $id))->id('document_form')->open() }} @else {{ html()->form('POST', route('document.store'))->attribute('data-toggle','validator')->id('document_form')->open() }} @endif