app/Http/Controllers/SiswaController.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)
    {
        Siswa::create([
            'nama' => $request->nama,
            'alamat' => $request->alamat,
            'no_hp' => $request->no_hp,
            'id_rayon' => $request->id_rayon,
            'rombel' => $request->rombel
        ]);
        return redirect('/siswa');
    }
public function store ( Request $ request ) { Siswa :: create ( [ 'nama' => $ request -> nama , 'alamat' => $ request -> alamat , 'no_hp' => $ request -> no_hp , 'id_rayon' => $ request -> id_rayon , 'rombel' => $ request -> rombel ] ) ; return redirect ( '/siswa' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .