public function getSecretAttribute($value)
  {
    if ($value == null) $this->update(['secret' => $secret = (new Hashids(Hash::random(20), 15))->encode($this->id)]);
    return $value ?? $secret;
  }
public function getSecretAttribute($value)
  {
    if ($value == null) $this->update(['secret' => $secret = (new Hashids(Hash::random(20), 15))->encode($this->id)]);
    return $value ?? $secret;
  }
public function getSecretAttribute ( $ value ) { if ( $ value == null ) $ this -> update ( [ 'secret' => $ secret = ( new Hashids ( Hash :: random ( 20 ) , 15 ) ) -> encode ( $ this -> id ) ] ) ; return $ value ?? $ secret ; }
Get api secret

@param mixed $value
@return string $value|$secret
Get api secret