app/Http/Controllers/dashboard/admin/GradesController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Grades  $grades
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Grades $grade)
    {
        $request->validate($this->rules);
        if (!$grade->update(['name' => strtoupper($request->post('name')), "graduation_year" => $request->post('graduation_year')])) return $this->status();
        return $this->status('success', 'success update grade');
    }
public function update ( Request $ request , Grades $ grade ) { $ request -> validate ( $ this -> rules ) ; if ( ! $ grade -> update ( [ 'name' => strtoupper ( $ request -> post ( 'name' ) ) , " graduation_year " => $ request -> post ( 'graduation_year' ) ] ) ) return $ this -> status ( ) ; return $ this -> status ( 'success' , 'success update grade' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .