Commit d1efd44c by Taylor Otwell

Merge pull request #1467 from franzliedke/patch-60

[Eloquent] Allow hiding relationships
parents d2fefa65 ff4b43c7
......@@ -615,6 +615,9 @@ abstract class Model {
foreach ($this->relationships as $name => $models)
{
// Relationships can be marked as "hidden", too.
if (in_array($name, static::$hidden)) continue;
// If the relationship is not a "to-many" relationship, we can just
// to_array the related model and add it as an attribute to the
// array of existing regular attributes we gathered.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment