Is it possible to create a scope where you specify the attributes it will return?
For example, I’d like to create a scope for my rest API, I’d like to exclude all kinds of attributes, like ID, modified, etc.
I know you can make a scope where you only select the columns you want, like this
public function defaultScope()
{
return array("select"=>"name,email");
}
but then the attributes of the model still exists, but they will have NULL values.