Because Post::where('postID', '=', $id)->get() returns Eloquent Collection, not Model. If 'postID' is PK, the use Post::find($id), otherwise use Post::where('postID', '=', $id)->first()
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community