app/Http/Controllers/CategoryController.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(CategoryCreateRequest $request)
    {
        $category = new Category();
        $category->name = $request->name;
        $category->save();
        return redirect('category')->with('message', 'Category Created Successfully');
    }
public function store ( CategoryCreateRequest $ request ) { $ category = new Category ( ) ; $ category -> name = $ request -> name ; $ category -> save ( ) ; return redirect ( 'category' ) -> with ( 'message' , 'Category Created Successfully' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .