app/Http/Controllers/Api/CategoryController.php
/**
     * Store a newly created Category in storage.
     *
     * @param  CategoryRequest  $request
     * @param Category $model
     * @return Response
     */
Store a newly created Category in storage.
@param  CategoryRequest  $request
@param Category $model
@return Response
Store a newly created Category in storage . @param CategoryRequest $request @param Category $model @return Response
public function store(CategoryRequest $request, Category $model)
    {
        $category = $model->create($request->all());
        return response()->json(["data"=>$category, "success"=>"Category Stored Successfully "]);
    }
public function store ( CategoryRequest $ request , Category $ model ) { $ category = $ model -> create ( $ request -> all ( ) ) ; return response ( ) -> json ( [ " data " => $ category , " success " => " Category Stored Successfully  " ] ) ; }
Store a newly created Category in storage.
Store a newly created Category in storage .