Exemplo n.º 1
0
 public function isValidToken($token)
 {
     $check = Model::Wstoken()->where(['token', '=', (string) $token])->cursor()->count();
     return $check == 1 ? true : false;
 }
Exemplo n.º 2
0
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();
}