Change payments states

{{-- {!! Form::open(['action' => [ 'App\Http\Controllers\PaymentsController@payments_state_update', $_POST["selected"] ], 'method' => 'POST']) !!} --}}
{{count($selected) > 0 ? 'Selected orders:' : 'No orders selected.'}}

@for ($i = 0; $i < count($selected); $i++) {{ $i != (count($selected)-1) ? ($selected[$i] . ', ') : $selected[$i]}} @endfor


@if (count($selected) > 0) @if (count($errors) == 0) @else You are not authorized to change the payment state of these orders: @for ($i = 0; $i < count($errors); $i++) {{ $i != (count($errors)-1) ? ($errors[$i] . ', ') : $errors[$i]}} @endfor . Deselect them and try again! @endif @else

Please select at least one order!

@endif
@if (count($selected) > 0 && count($errors) == 0) @endif