app/Http/Controllers/ControllerSantri.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,[
            'nama' => 'required|max:40',
            'role' => 'required|in:Backend,Frontend,Designer,Video_editor',
            'email' => 'required|max:40|email'
        ]);
        $items = $request->all();
        Santri::create($items);
        return redirect()->route('santri.index');
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'nama' => 'required|max:40' , 'role' => 'required|in:Backend,Frontend,Designer,Video_editor' , 'email' => 'required|max:40|email' ] ) ; $ items = $ request -> all ( ) ; Santri :: create ( $ items ) ; return redirect ( ) -> route ( 'santri.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .