Call to undefined method App\User::ratings()

Posted 2 months ago by jeremihza

public function postPost(Request $request) { request()->validate(['rate' => 'required']); $post = user::find($request->id); $rating = new \willvincent\Rateable\Rating; $rating->rating = $request->rate; $rating->user_id = auth()->user()->id; $post->ratings()->save($rating); return redirect()->route("posts"); }

Please sign in or create an account to participate in this conversation.