app/Http/Controllers/HistoryKendaraanController.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)
    {
        $request->validate([
            'platnomer' => 'required',
            'jenis_kendaraan' => 'required',
            'laka_kecelakaan' => 'required',
            'pelanggaran' => 'required',
            'tanggal_kejadian' => 'required',
            'tempat_kejadian' => 'required',
        ]);
        HistoryKendaraan::create($request->all());
        return redirect()->route('HistoryKendaraan.index')
            ->with('success', 'History Kendaraan Berhasil Ditambahkan');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'platnomer' => 'required' , 'jenis_kendaraan' => 'required' , 'laka_kecelakaan' => 'required' , 'pelanggaran' => 'required' , 'tanggal_kejadian' => 'required' , 'tempat_kejadian' => 'required' , ] ) ; HistoryKendaraan :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'HistoryKendaraan.index' ) -> with ( 'success' , 'History Kendaraan Berhasil Ditambahkan' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .