public function getApiKeyAttribute($value)
  {
    if ($value == null) $this->update(['api_key' => $key = Hash::random(25)]);
    return $value ?? $key;
  }
public function getApiKeyAttribute($value)
  {
    if ($value == null) $this->update(['api_key' => $key = Hash::random(25)]);
    return $value ?? $key;
  }
public function getApiKeyAttribute ( $ value ) { if ( $ value == null ) $ this -> update ( [ 'api_key' => $ key = Hash :: random ( 25 ) ] ) ; return $ value ?? $ key ; }
Get api key

@return string $key
@param int $len
Get api key