@if(Route::currentRouteName() != 'users.delete') {!! Form::open(['route' => ['users.destroy', $id], 'method' => 'delete']) !!} {!! Form::button('', [ 'type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure you want to delete account permanently?')" ]) !!} @else {!! Form::open(['route' => ['destroy.user', $id], 'method' => 'delete']) !!} {!! Form::button('', [ 'type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure you want to delete account permanently?')" ]) !!} @endif
{!! Form::close() !!}