diff --git a/src/QueryRepository.php b/src/QueryRepository.php index 79327af..8c1a265 100644 --- a/src/QueryRepository.php +++ b/src/QueryRepository.php @@ -24,6 +24,9 @@ class QueryRepository */ protected $mapping; + /** + * @var \Rougin\Windstorm\MixedInterface + */ protected $mixed = null; /** @@ -87,6 +90,16 @@ public function first() return $item; } + /** + * Returns the last inserted ID. + * + * @return integer + */ + public function inserted() + { + return $this->execute($this->query)->inserted(); + } + /** * Returns all items from the result. *