toJson() public method

Convert the model instance to JSON.
public toJson ( integer $options ) : string
$options integer
return string
Ejemplo n.º 1
0
 public function toJson($options = 0)
 {
     return parent::toJson($options);
 }
Ejemplo n.º 2
0
 /**
  * Called after a child model is deleted.
  *
  * @param  string    $key
  * @param  BaseModel $model
  *
  * @return void
  */
 public function postDeleteChild(Model $model, $relation)
 {
     if ($this->isRevisionEnabled()) {
         $revision = $this->prepareRevision($relation, $model->toJson(), null);
         $this->cleanupRevisions();
         $this->dbInsert($revision);
     }
 }
Ejemplo n.º 3
0
 public function toJson($options = 0)
 {
     return $this->model->toJson();
 }
Ejemplo n.º 4
0
 public function toJson($options = 0)
 {
     $this->getVisibleAttribute();
     return parent::toJson();
 }