app/Http/Controllers/dashboard/admin/GradesController.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)
    {
        $request->validate($this->rules);
        $newGrade = new Grades(["name" => strtoupper($request->post('name')), "graduation_year" => $request->post('graduation_year')]);
        if (!$newGrade->save()) return $this->status();
        return $this->status('success', "success create new grades");
    }
public function store ( Request $ request ) { $ request -> validate ( $ this -> rules ) ; $ newGrade = new Grades ( [ " name " => strtoupper ( $ request -> post ( 'name' ) ) , " graduation_year " => $ request -> post ( 'graduation_year' ) ] ) ; if ( ! $ newGrade -> save ( ) ) return $ this -> status ( ) ; return $ this -> status ( 'success' , " success create new grades " ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .