mirror of
https://codeberg.org/vlw/scaffold.git
synced 2025-11-05 06:02:42 +01:00
refactor: replace the Model->isset property with a public instance method
This commit is contained in:
parent
feea36b190
commit
6ceb58c2c8
1 changed files with 2 additions and 3 deletions
|
|
@ -72,9 +72,8 @@
|
|||
*
|
||||
* @return bool Entity exists
|
||||
*/
|
||||
public bool $isset {
|
||||
// Returns bool if row is set or attempts to resolve and set if null
|
||||
get => $this->_isset ??= new Database()
|
||||
public function isset(): bool {
|
||||
return $this->_isset ??= new Database()
|
||||
->from($this->table)
|
||||
->where($this->where)
|
||||
->limit(1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue