コード例 #1
0
ファイル: Page.php プロジェクト: schpill/standalone
 public function isValidToken($token)
 {
     $check = Model::Wstoken()->where(['token', '=', (string) $token])->cursor()->count();
     return $check == 1 ? true : false;
 }
コード例 #2
0
ファイル: functions.php プロジェクト: schpill/standalone
function createUserWithOptions($user, $options = [])
{
    $people = Model::People()->firstOrCreate($user);
    if (!empty($options)) {
        foreach ($people as $key => $option) {
            opt($people)->set($key, $option);
        }
    }
    return opt($people)->all();
}