/**
  * Set the field attribute.
  *
  * @param FieldInterface $field
  */
 public function setFieldAttribute(FieldInterface $field)
 {
     $this->attributes['field_id'] = $field->getId();
 }
 /**
  * Find an assignment by stream and field.
  *
  * @param  StreamInterface                        $stream
  * @param  FieldInterface                         $field
  * @return null|AssignmentInterface|EloquentModel
  */
 public function findByStreamAndField(StreamInterface $stream, FieldInterface $field)
 {
     return $this->model->where('stream_id', $stream->getId())->where('field_id', $field->getId())->first();
 }