File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace Leaf \Auth ;
44
5+ use PDO ;
6+ use PDOStatement ;
7+
58/**
69 * Auth User Model
710 * ----
@@ -44,9 +47,9 @@ public function __construct($data)
4447 *
4548 * @param array $data Data to be inserted
4649 *
47- * @return bool
50+ * @return PDOStatement|null
4851 */
49- public function create (array $ data ): bool
52+ public function create (array $ data ): ? PDOStatement
5053 {
5154 $ data ['user_id ' ] = $ this ->user ->id ();
5255
@@ -56,7 +59,7 @@ public function create(array $data): bool
5659 $ data ['updated_at ' ] = $ now ;
5760 }
5861
59- return $ this ->db ->table ($ this ->table )->insert ($ data )->execute ();
62+ return $ this ->db ->insert ($ this ->table )->params ($ data )->execute ();
6063 }
6164
6265 /**
@@ -102,9 +105,9 @@ public function table($columns = '*'): \Leaf\Db
102105 /**
103106 * Save a model resource
104107 *
105- * @return bool
108+ * @return PDOStatement|null
106109 */
107- public function save (): bool
110+ public function save (): ? PDOStatement
108111 {
109112 $ success = $ this ->create ($ this ->dataToSave );
110113
You can’t perform that action at this time.
0 commit comments