I am trying to submit a form but laravel throws an error in this line. Please help me determine what the issue is.
<form method = '{{isset($address)? 'PATCH': 'POST}}' action="{{isset($address) ? 'acount/$id' : '/account'}}" >
error :syntax error, unexpected 'action' (T_STRING), expecting ',' or ')'
You are not using the quotes properly. Use it like this:
<form method="{{ isset($address) ? 'PATCH': 'POST' }}" action="{{ isset($address) ? 'acount/'.$id : '/account' }}" >
Try this:
<form method = "POST" action="{{isset($address) ? 'acount/$id' : '/account'}}" >
{{ (isset($address)) ? method_field('PUT') : '' }}
{{ csrf_field() }}