app/Http/Controllers/ProductController.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)
    {
        $input['nama'] = $request->nama;
        $input['harga_jual'] = $request->harga_jual;
        $input['harga_beli'] = $request->harga_beli;
        $input['disc'] = $request->disc;
        $input['status'] = $request->status;
        $input['stok'] = $request->stok;
        $input['keterangan'] = $request->keterangan;
        $input['id_unit'] = $request->id_unit;
        $input['id_curr'] = $request->id_curr;
        $input['id_kategori'] = $request->id_kategori;
        Product::create($input);
        return redirect()->route('product.index');
    }
public function store ( Request $ request ) { $ input [ 'nama' ] = $ request -> nama ; $ input [ 'harga_jual' ] = $ request -> harga_jual ; $ input [ 'harga_beli' ] = $ request -> harga_beli ; $ input [ 'disc' ] = $ request -> disc ; $ input [ 'status' ] = $ request -> status ; $ input [ 'stok' ] = $ request -> stok ; $ input [ 'keterangan' ] = $ request -> keterangan ; $ input [ 'id_unit' ] = $ request -> id_unit ; $ input [ 'id_curr' ] = $ request -> id_curr ; $ input [ 'id_kategori' ] = $ request -> id_kategori ; Product :: create ( $ input ) ; return redirect ( ) -> route ( 'product.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .