app/Http/Controllers/TheBlog/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(StoreCategoryRequest $request)
   {
        $category = Category::create($request->all());
        return $this->sendResponse(new CategoryResource($category), 'Category created successfully.');
    }
public function store ( StoreCategoryRequest $ request ) { $ category = Category :: create ( $ request -> all ( ) ) ; return $ this -> sendResponse ( new CategoryResource ( $ category ) , 'Category created successfully.' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .