app/Http/Controllers/Api/v1/RateController.php
/**
     * Create one new Rate
     *
     * @return Illuminate\Http\Response
     */
Create one new Rate
@return Illuminate\Http\Response
Create one new Rate @return Illuminate \ Http \ Response
public function store(Request $request)
    {
        $this->validate($request,[
            'rate'=>'required|numeric|between:1,5',
            'user_id'=>'required|integer',
            'object_id'=>'required|integer',
            'category_id'=>'required|integer',
        ]);
        $rate = Rate::create($request->all());
        return $this->successResponse($rate,Response::HTTP_CREATED);
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'rate' => 'required|numeric|between:1,5' , 'user_id' => 'required|integer' , 'object_id' => 'required|integer' , 'category_id' => 'required|integer' , ] ) ; $ rate = Rate :: create ( $ request -> all ( ) ) ; return $ this -> successResponse ( $ rate , Response :: HTTP_CREATED ) ; }
Create one new Rate
 @return Illuminate\Http\Response
Create one new Rate @return Illuminate \ Http \ Response
//