app/Http/Controllers/ArtikelController.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)
    {
        $this->validate($request,[
            'deskripsi' => 'required|',
            ]);
        $artikel = new Artikel;
        $artikel->deskripsi = $request->deskripsi;
        $artikel->save();
        return redirect()->route('artikel.index');
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'deskripsi' => 'required|' , ] ) ; $ artikel = new Artikel ; $ artikel -> deskripsi = $ request -> deskripsi ; $ artikel -> save ( ) ; return redirect ( ) -> route ( 'artikel.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .