Hm...I think the only way to do this is except by manually not selecting it when you run your query. For example...
Model::get(['id', 'other_info', 'more_info']);
If you don't want to type out all the select info and you want to make it cleaner, you can create a scope for this. Inside your model, add something like this:
public function scopeAnonymous($query)
{
return $query->select('id', 'and_other_info_you_want');
}
Then, you can just run this:
Model::anonymous()->get();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community