app/Http/Controllers/BankController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\bank  $bank
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Request $request,bank $bank)
    {
        $bank = bank::find($request->id);
        if ($bank) {
            $Data = $bank->delete();
            if ($Data) {
                $response = [
                    'message' => 'bank Deleted'
                ];
                return response($response, 201);
            } else {
                return response([
                    'message' => 'These operation has failed'
                ], 404);
            }
        } else {
            return response([
                'message' => 'No bank Found'
            ], 404);
        }
    }
public function destroy ( Request $ request , bank $ bank ) { $ bank = bank :: find ( $ request -> id ) ; if ( $ bank ) { $ Data = $ bank -> delete ( ) ; if ( $ Data ) { $ response = [ 'message' => 'bank Deleted' ] ; return response ( $ response , 201 ) ; } else { return response ( [ 'message' => 'These operation has failed' ] , 404 ) ; } } else { return response ( [ 'message' => 'No bank Found' ] , 404 ) ; } }
Remove the specified resource from storage.
Remove the specified resource from storage .
//