diff --git a/docs/advanced.rst b/docs/advanced.rst index c50483284c..d60f4555d6 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -257,9 +257,9 @@ Start by creating a class:: return $entity; } - public function restore(Model $m) + public function restore(Model $entity) { - $m->assertIsLoaded(); + $entity->assertIsLoaded(); $id = $entity->getId(); if ($entity->hook('beforeRestore') === false) {