Closed benrowe closed 8 years ago
+1 I am looking for the same ... Extend the package with custom driver.
(Laravel 4.2)
How would you guys like to see the syntax for this?
Look at #8 with this architect we may extend service like this
<?php
namespace App\ServiceProviders;
use SimpleSoftwareIO\SMS\SMSServiceProvider as BaseSMSServiceProvider
class SMSServiceProvider extends BaseSMSServiceProvider
{
public function registerSender()
{
parent::registerSender();
$this->app['sms.sender']->extend('sendername', function ($app) {
// some logic for creation driver here
return new MySenderDriver();
})
}
}
I'll be adding this shortly. Most likely this upcoming weekend.
Fixed in 2.1.0 with the new driver
method.
It would be nice if there was an easy way to write drivers for additional services and have them loaded in.
At the moment the drivers are hard coded and there's no way to specify a different driver.