Open hoppities opened 8 years ago
Try the following:
namespace App\Extensions;
use Msurguy\Honeypot\Honeypot as BaseHoneypot;
class Honeypot extends BaseHoneypot
{
public function generate(array $honey_name, array $honey_time)
{
$honey_time_encrypted = parent::getEncryptedTime();
//
//....
//....
}
}
You will also need to replace the resolved instance in the IOC. A good place to put this is in your own service provider which is included after HoneypotServiceProvider
in your app.php:
app()->singleton('honeypot', 'App\Extensions\Honeypot');
If you have any further questions it's probably best asking on Stackoverflow as this stuff isn't really specific to honeypot but more of an understanding of namespaces and Laravel's IOC.
Ah! Of course...thanks!
I'm trying to extend Honeypot, and I'm running into issues.
I created my service provider, and that works fine, but I can't seem to call the parent class methods.
I get the error
Call to undefined method App\Extensions\MyHoneypot::getEncryptedTime()
.I also attempted to
use Msurguy\Honeypot
, but that, too, failed. It could not find the class.Any thoughts why?