app/Http/Controllers/BarangController.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['jumlah'] = $request->jumlah;
        $input['status'] = $request->status;
        $input['via'] = $request->via;
        Barang::create($input);
        return redirect()->route('barang-masuk.index');
    }
public function store ( Request $ request ) { $ input [ 'nama' ] = $ request -> nama ; $ input [ 'jumlah' ] = $ request -> jumlah ; $ input [ 'status' ] = $ request -> status ; $ input [ 'via' ] = $ request -> via ; Barang :: create ( $ input ) ; return redirect ( ) -> route ( 'barang-masuk.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .