app/Http/Controllers/NoSertifikatController.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)
    {
        date_default_timezone_set("Asia/Bangkok");
        $request->validate([
            'no_sertifikat' => 'required',
            'kode_sertifikat' => 'required',
            'tgl_pelaksanaan' => 'required',
            'tgl_sertifikat' => 'required',
        ]);
        NoSertifikat::create([
            'no_sertifikat' => $request->no_sertifikat,
            'kode_sertifikat' => $request->kode_sertifikat,
            'tgl_pelaksanaan' => $request->tgl_pelaksanaan,
            'tgl_sertifikat' => $request->tgl_sertifikat
            ]);
        return redirect()->route('nomorsertifikat.index')
                        ->with('success', 'Data Baru berhasil dibuat');
    }
public function store ( Request $ request ) { date_default_timezone_set ( " Asia/Bangkok " ) ; $ request -> validate ( [ 'no_sertifikat' => 'required' , 'kode_sertifikat' => 'required' , 'tgl_pelaksanaan' => 'required' , 'tgl_sertifikat' => 'required' , ] ) ; NoSertifikat :: create ( [ 'no_sertifikat' => $ request -> no_sertifikat , 'kode_sertifikat' => $ request -> kode_sertifikat , 'tgl_pelaksanaan' => $ request -> tgl_pelaksanaan , 'tgl_sertifikat' => $ request -> tgl_sertifikat ] ) ; return redirect ( ) -> route ( 'nomorsertifikat.index' ) -> with ( 'success' , 'Data Baru berhasil dibuat' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .