This commit is contained in:
2024-12-29 21:10:58 +08:00
parent b3f50fc6e4
commit 78f7faba55
+1 -1
View File
@@ -766,7 +766,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
*/
protected function withRelate(string $name): mixed
{
$response = $this->$name();
$response = $this->{'get' . ucfirst($name)}();
if ($response instanceof \Database\Traits\Relation) {
$response = $response->get();
}