Skip to content

Commit d342e28

Browse files
committed
ad boot method
1 parent 65b0e9b commit d342e28

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Model.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,4 +418,6 @@ public function __call($method, $parameters)
418418
{
419419
return $this->newQuery()->$method(...$parameters);
420420
}
421+
422+
public function boot($query){}
421423
}

src/Query.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,10 @@ public function query()
745745
$query["type"] = $this->getType();
746746
}
747747

748+
if($this->model){
749+
$this->model->boot($this);
750+
}
751+
748752
$query["body"] = $this->getBody();
749753

750754
$query["from"] = $this->getSkip();

0 commit comments

Comments
 (0)