app/Http/Controllers/Student/TutorsController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Assignment  $assignment
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Assignment $tutor)
    {
        if (Gate::denies('manage-student-tutors')) return redirect()->route('student.tutors.index');
        $tutor->status_by_student = "No More Tutoring";
        if (!$tutor->save()) session()->flash('error', "There is an error updating Student(s) status.");
        else session()->flash('success', "Student(s) status successfully updated.");
        return redirect()->route('student.tutors.index');
    }
public function update ( Request $ request , Assignment $ tutor ) { if ( Gate :: denies ( 'manage-student-tutors' ) ) return redirect ( ) -> route ( 'student.tutors.index' ) ; $ tutor -> status_by_student = " No More Tutoring " ; if ( ! $ tutor -> save ( ) ) session ( ) -> flash ( 'error' , " There is an error updating Student(s) status. " ) ; else session ( ) -> flash ( 'success' , " Student(s) status successfully updated. " ) ; return redirect ( ) -> route ( 'student.tutors.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .