I got three tables called threads,posts,users
threads got
id
title
etc.
posts got
id
thread_id
user_id
post
post_date
etc.
users got
id
username
password
email
etc.
when users wants to view a thread i simply call a jquery ajax request using post data to send thread id and return this code :
Response::eloquent(Thread::find(Input::get('threadid'))->posts()->get());
this code does his job perfectly and return posts by same thread_id. (post model also eager loads the user by looking user_id).
however this code grabs every attribute of posts and users i mean everything to json, post_date, post_updatereason, user_password, user_email all columns in tables.
I just want to grab post, username and post_date with json