Skip to content

Commit

Permalink
Merge branch 'serialize-relationships' of https://github.com/browner1…
Browse files Browse the repository at this point in the history
…2/framework into browner12-serialize-relationships
  • Loading branch information
taylorotwell committed Sep 21, 2017
2 parents 71163ae + adb26e1 commit 6f5bc33
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Database/ModelIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,27 @@ class ModelIdentifier
*/
public $connection;

/**
* The relationships loaded on the model.
*
* @var array
*/
public $relations;

/**
* Create a new model identifier.
*
* @param string $class
* @param mixed $id
* @param mixed $connection
* @param array $relations
* @return void
*/
public function __construct($class, $id, $connection)
public function __construct($class, $id, $connection, $relations)
{
$this->id = $id;
$this->class = $class;
$this->connection = $connection;
$this->relations = $relations;
}
}
7 changes: 7 additions & 0 deletions Queue/QueueableCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@ public function getQueueableIds();
* @return string|null
*/
public function getQueueableConnection();

/**
* Get the relationships of the entities being queued.
*
* @return array
*/
public function getQueueableRelations();
}
7 changes: 7 additions & 0 deletions Queue/QueueableEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ public function getQueueableId();
* @return string|null
*/
public function getQueueableConnection();

/**
* Get the relationships for the entity.
*
* @return array
*/
public function getQueueableRelations();
}

0 comments on commit 6f5bc33

Please sign in to comment.