app/Http/Controllers/BahanController.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_bahan'] = $request->nama_bahan;
        $input['satuan'] = $request->satuan;
        Bahan::create($input);
        return redirect()->route('bahan.index');
    }
public function store ( Request $ request ) { $ input [ 'nama_bahan' ] = $ request -> nama_bahan ; $ input [ 'satuan' ] = $ request -> satuan ; Bahan :: create ( $ input ) ; return redirect ( ) -> route ( 'bahan.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .