| @@ 27-37 (lines=11) @@ | ||
| 24 | ||
| 25 | } |
|
| 26 | ||
| 27 | public function unlock() |
|
| 28 | { |
|
| 29 | ||
| 30 | \DB::table($this->getTable()) |
|
| 31 | ->where($this->getKeyName(),$this->getKey()) |
|
| 32 | ->decrement($this->column_nb_of_try_name,$this->{$this->column_nb_of_try_name}); |
|
| 33 | ||
| 34 | $this->{$this->column_nb_of_try_name} = 0; |
|
| 35 | return $this; |
|
| 36 | ||
| 37 | } |
|
| 38 | ||
| 39 | public function lock() |
|
| 40 | { |
|
| @@ 39-48 (lines=10) @@ | ||
| 36 | ||
| 37 | } |
|
| 38 | ||
| 39 | public function lock() |
|
| 40 | { |
|
| 41 | $this->{$this->column_nb_of_try_name} = config($this->config_key_security_lock) + 1; |
|
| 42 | ||
| 43 | \DB::table($this->getTable()) |
|
| 44 | ->where($this->getKeyName(),$this->getKey()) |
|
| 45 | ->increment($this->column_nb_of_try_name,$this->{$this->column_nb_of_try_name} ); |
|
| 46 | ||
| 47 | return $this; |
|
| 48 | } |
|
| 49 | ||
| 50 | } |
|