public function getVotes($ip = NULL, $id = NULL) { return $id == NULL ? Vote::all() : Vote::where('ip_address', '=', $ip)->where('id_post', '=', $id)->get(); }
public function getVotes($ip = NULL, $id = NULL) { return $id == NULL ? Vote::all() : Vote::where('ip_address', '=', $ip)->where('id_post', '=', $id)->get(); }