コード例 #1
0
ファイル: Register.php プロジェクト: BePsvPT/CCU
 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')];
 }
コード例 #2
0
ファイル: Event.php プロジェクト: BePsvPT/CCU
 /**
  * @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]);
 }