app/Http/Controllers/guestbook.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)
    {
        $data = $request->all();
        $hasil= gs::create($data);
        if($hasil)
        {
            return redirect('guestbook')->with('pesan' ,'Data Berhasil Disimpan');
        }
        else {
           return redirect('guestbook')->with('pesanslh' ,'Data Gagal Disimpan');
        }
    }
public function store ( Request $ request ) { $ data = $ request -> all ( ) ; $ hasil = gs :: create ( $ data ) ; if ( $ hasil ) { return redirect ( 'guestbook' ) -> with ( 'pesan' , 'Data Berhasil Disimpan' ) ; } else { return redirect ( 'guestbook' ) -> with ( 'pesanslh' , 'Data Gagal Disimpan' ) ; } }
Store a newly created resource in storage.
Store a newly created resource in storage .
// $simpanbg=$request->all(); // return $simpanbg; 