Beispiel #1
0
 public static function generate()
 {
     if (!\Auth::check()) {
         return NULL;
     }
     $apiKey = new ApiKey();
     $apiKey->user_id = \Auth::user()->id;
     $apiKey->api_key = \App\Helpers\Text::randomCryptoString();
     $apiKey->save();
     return $apiKey;
 }