app/Http/Controllers/OrdenController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Orden  $orden
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy($id)
    {
      try {
        $orden=Orden::findOrFail($id);
      if($orden->estado_pago=="SIN CANCELAR"){
        $orden->delete();
      }
    return redirect()->action('OrdenController@index');
    } catch (Exception $e) {
    }
    }
public function destroy ( $ id ) { try { $ orden = Orden :: findOrFail ( $ id ) ; if ( $ orden -> estado_pago == " SIN CANCELAR " ) { $ orden -> delete ( ) ; } return redirect ( ) -> action ( 'OrdenController@index' ) ; } catch ( Exception $ e ) { } }
Remove the specified resource from storage.
Remove the specified resource from storage .