app/Http/Controllers/PekerjaanSelesaiController.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)
    {
        $data = request()->validate([
            'ccr_id' => 'required|exists:ccr,id',
            'date_finish' => 'required|date',
        ]);
        $data['ppc_id'] = Auth::user()->ppc->id;
        PekerjaanSelesai::create($data);
        return redirect()->route('selesai.index')->with('success', 'Konfirmasi Perkerjaan Selesai berhasil');
    }
public function store ( Request $ request ) { $ data = request ( ) -> validate ( [ 'ccr_id' => 'required|exists:ccr,id' , 'date_finish' => 'required|date' , ] ) ; $ data [ 'ppc_id' ] = Auth :: user ( ) -> ppc -> id ; PekerjaanSelesai :: create ( $ data ) ; return redirect ( ) -> route ( 'selesai.index' ) -> with ( 'success' , 'Konfirmasi Perkerjaan Selesai berhasil' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .