gr8shivam / laravel-sms-api

Laravel package to provide SMS API integration.
MIT License
99 stars 30 forks source link

Facade dynamic using problem #29

Closed bozkurtemre closed 2 years ago

bozkurtemre commented 2 years ago

When i want to use with facade like SmsApi::sendMessage("0XXXXXX", "Test") giving the "Non-static method 'sendMessage' should not be called statically" error.

image

gr8shivam commented 2 years ago

Thanks for reporting this. Will push an update to fix this.

bozkurtemre commented 2 years ago

Thanks for reply I hope soon fixed.

gr8shivam commented 2 years ago

The issue is that you're explicitly providing the class to use. This stops Laravel from using the specified alias.

Remove the manual class import use Gr8Shivam\SmsApi\SmsApi; from your code and let Laravel do its magic.