Example #1
0
 public function validateMottoContains($attribute, $value, $parameters)
 {
     $account = $this->getAccount($value);
     $user = \Auth::user();
     if ($account instanceof Account && $user instanceof User) {
         $client = new Client();
         $json = $client->getBungieProfile($account);
         if ($json != null && str_contains($json['about'], $user->google_id)) {
             return true;
         }
     }
     return false;
 }