Ребята всем привет! Все вожусь я со своими Providers. Не могу найти проблему. Если что в конфиг app.php сервис подключен. У меня ошибка: Call to a member function bind() on null. Класс и интерфейс точно существуют проверял class_exist и interface_exist
class PayPartsServiceProvider extends ServiceProvider
{
private $storeId;
private $password;
private $payParts;
public function __construct()
{
$this->storeId = config('payparts.store_id');
$this->password = config('payparts.password');
if(empty($this->storeId)){
throw new \InvalidArgumentException('store_id is empty');
}
if(empty($this->password)){
throw new \InvalidArgumentException('password is empty');
}
$this->payParts = new PayParts($this->storeId, $this->password);
}
/**
* Register services.
*
*
@return void
*/
public function register()
{
$this->app->bind(
'App\Interfaces\PayPartsInterface',
'App\Services\PayPartsService');
}
/**
* Bootstrap services.
*
*
@return void
*/
public function boot()
{
}
}
namespace App\Services;
use App\Interfaces\PayPartsInterface;
class PayPartsService implements PayPartsInterface
{
public function setOptions(array $options)
{
$this->payParts->setOptions($options);
}
public function create(string $method)
{
return $this->payParts->create($method);
}
}
namespace App\Interfaces;
interface PayPartsInterface
{
public function setOptions(array $options);
public function create(string $method);
}