app/Http/Controllers/ProdiController.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)
    {
        $prodi = new Prodi;
        $prodi->prodi_nama = $request->nama;
        $prodi->save();
        if ($prodi) {
            return redirect()->route('prodi')->with('success', 'Data Berhasil Disimpan');
        } else {
            return redirect()->route('prodi')->with('error', 'Data Gagal Disimpan');
        }
    }
public function store ( Request $ request ) { $ prodi = new Prodi ; $ prodi -> prodi_nama = $ request -> nama ; $ prodi -> save ( ) ; if ( $ prodi ) { return redirect ( ) -> route ( 'prodi' ) -> with ( 'success' , 'Data Berhasil Disimpan' ) ; } else { return redirect ( ) -> route ( 'prodi' ) -> with ( 'error' , 'Data Gagal Disimpan' ) ; } }
Store a newly created resource in storage.
Store a newly created resource in storage .