app/Http/Controllers/DetailTransaksiController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $create = DetailTransaksi::create([
            'transaksi_id' =>  $request->transaksi_id,
            'paket_id' =>  $request->paket_id,
            'qty' => $request->qty,
            'keterangan' => $request->keterangan
        ]);
        if($create){
            return response()->json([
                'status' => true
            ]);
        }
        else{
            return response()->json([
                'status' => false
            ]);
        }
    }
public function store ( Request $ request ) { $ create = DetailTransaksi :: create ( [ 'transaksi_id' => $ request -> transaksi_id , 'paket_id' => $ request -> paket_id , 'qty' => $ request -> qty , 'keterangan' => $ request -> keterangan ] ) ; if ( $ create ) { return response ( ) -> json ( [ 'status' => true ] ) ; } else { return response ( ) -> json ( [ 'status' => false ] ) ; } }
Store a newly created resource in storage.
Store a newly created resource in storage .