Example #1
0
 protected function make()
 {
     $this->expireOldTokens($this->category, $this->account->getAttribute('id'));
     $verify = Verify::create(['token' => str_random(100), 'category_id' => $this->category, 'account_id' => $this->account->getAttribute('id'), 'created_at' => Carbon::now()]);
     $this->data = ['token' => $verify->getAttribute('token')];
 }
Example #2
0
 /**
  * @param string $categoryName
  * @param \App\Ccu\Member\Account $account
  * @param string $action
  * @param mixed|null $detail
  * @return Event
  */
 public static function _create($categoryName, $account, $action, $detail = null)
 {
     return static::create(['category_id' => Category::getCategories($categoryName, true), 'account_id' => $account->getAttribute('id'), 'action' => $action, 'detail' => $detail]);
 }