From 32e10e2a61f954300147610d5d8930a5ff3a8943 Mon Sep 17 00:00:00 2001 From: alissonalbuquerque Date: Mon, 28 Mar 2022 14:08:31 -0300 Subject: [PATCH] add attributeName function --- app/Models/User.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Models/User.php b/app/Models/User.php index f04cedb..444211e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -121,6 +121,13 @@ class User extends Authenticatable return $this->type === self::TYPE_COORDINATOR; } + /** + * @return string + */ + public function attributeName(string $attribute) { + return $this->getTable() . '-' . $attribute; + } + /** * @return string */ -- GitLab