|
@@ -31,7 +31,7 @@ abstract class AbstractDisplayer
|
|
|
protected $column;
|
|
|
|
|
|
/**
|
|
|
- * @var Fluent
|
|
|
+ * @var \Illuminate\Database\Eloquent\Model
|
|
|
*/
|
|
|
public $row;
|
|
|
|
|
@@ -71,11 +71,11 @@ abstract class AbstractDisplayer
|
|
|
|
|
|
protected function setRow($row)
|
|
|
{
|
|
|
- if ($row instanceof Arrayable) {
|
|
|
- $row = $row->toArray();
|
|
|
+ if (is_array($row)) {
|
|
|
+ $row = new Fluent($row);
|
|
|
}
|
|
|
|
|
|
- $this->row = new Fluent($row);
|
|
|
+ $this->row = $row;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -104,7 +104,7 @@ abstract class AbstractDisplayer
|
|
|
*/
|
|
|
public function getKey()
|
|
|
{
|
|
|
- return $this->row->get($this->grid->getKeyName());
|
|
|
+ return $this->row->{$this->grid->getKeyName()};
|
|
|
}
|
|
|
|
|
|
/**
|