app/Http/Controllers/Admin/ExerciseCategoryController.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)
    {
        $this->validate($request, [
            'category_name' => 'required'
        ]);
        ExerciseCategory::create([
            'category_name' => $request->category_name
        ]);
        return redirect('/admin/exercise-categories');
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'category_name' => 'required' ] ) ; ExerciseCategory :: create ( [ 'category_name' => $ request -> category_name ] ) ; return redirect ( '/admin/exercise-categories' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .