app/Http/Controllers/API/EnrolmentController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \App\Http\Requests\StoreEnrolmentRequest  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(StoreEnrolmentRequest $request)
    {
        $enrolments = new Enrolment([
            'stud_id' => $request->stud_id,
            'prog_id' => $request->prog_id,
            'mname' => $request->mname,
            'suffix' => $request->suffix,
            'mstatus' => $request->mstatus,
            'gender' => $request->gender,
            'bdate' => $request->bdate,
            'paddress' => $request->paddress,
            'slattended' => $request->slattended,
            'course' => $request->course,
            'termcon' => $request->termcon,
            'modepay' => $request->modepay
        ]);
        $enrolments->save();
        return response()->json('You havew succesfully enrolled!!');
    }
public function store ( StoreEnrolmentRequest $ request ) { $ enrolments = new Enrolment ( [ 'stud_id' => $ request -> stud_id , 'prog_id' => $ request -> prog_id , 'mname' => $ request -> mname , 'suffix' => $ request -> suffix , 'mstatus' => $ request -> mstatus , 'gender' => $ request -> gender , 'bdate' => $ request -> bdate , 'paddress' => $ request -> paddress , 'slattended' => $ request -> slattended , 'course' => $ request -> course , 'termcon' => $ request -> termcon , 'modepay' => $ request -> modepay ] ) ; $ enrolments -> save ( ) ; return response ( ) -> json ( 'You havew succesfully enrolled!!' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .