Visual Console Refactor: added a new way to expose model data
Former-commit-id: 935960e7e21c2a655e9eb38afa04cbf96362aef7
This commit is contained in:
parent
344e46bc4d
commit
179702979a
|
@ -103,6 +103,17 @@ abstract class Model
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* JSON representation of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* JSON representation of the model.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue