{"id":21141889,"url":"https://github.com/matthewbdaly/laravel-sms","last_synced_at":"2025-07-09T05:32:07.849Z","repository":{"id":57016535,"uuid":"104585463","full_name":"matthewbdaly/laravel-sms","owner":"matthewbdaly","description":"SMS service provider for Laravel","archived":false,"fork":false,"pushed_at":"2017-11-10T13:54:37.000Z","size":52,"stargazers_count":35,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-12T23:39:43.726Z","etag":null,"topics":["laravel","php","sms"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthewbdaly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-23T17:21:17.000Z","updated_at":"2024-05-06T05:26:37.000Z","dependencies_parsed_at":"2022-08-22T09:30:28.650Z","dependency_job_id":null,"html_url":"https://github.com/matthewbdaly/laravel-sms","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewbdaly%2Flaravel-sms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewbdaly%2Flaravel-sms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewbdaly%2Flaravel-sms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewbdaly%2Flaravel-sms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewbdaly","download_url":"https://codeload.github.com/matthewbdaly/laravel-sms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225488483,"owners_count":17482289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","php","sms"],"created_at":"2024-11-20T07:38:14.348Z","updated_at":"2024-11-20T07:38:15.080Z","avatar_url":"https://github.com/matthewbdaly.png","language":"PHP","funding_links":[],"categories":["Packages"],"sub_categories":["Third-Party API Support"],"readme":"# laravel-sms\n[![Build Status](https://travis-ci.org/matthewbdaly/laravel-sms.svg?branch=master)](https://travis-ci.org/matthewbdaly/laravel-sms)\n\nSMS service provider for Laravel and Lumen. Uses [SMS Client](https://github.com/matthewbdaly/sms-client) to enable sending SMS messages using the following drivers:\n\n* `nexmo`\n* `clockwork`\n* `textlocal`\n* `twilio`\n* `aws` (requires installation of `aws/aws-sdk-php`)\n* `mail` (somewhat untested and may be too generic to be much use)\n\nAlso has the following drivers for testing purposes:\n\n* `log`\n* `null`\n* `requestbin`\n\nInstallation for Laravel\n------------------------\n\nThis package is only intended for Laravel 5.5 and up. Install it with the following command:\n\n```bash\n$ composer require matthewbdaly/laravel-sms\n```\n\nThen publish the config file:\n\n```bash\n$ php artisan vendor:publish\n```\n\nYou will need to select the service provider `Matthewbdaly\\LaravelSMS\\LaravelSMSProvider`. Then set your driver and any settings required in the `.env` file for your project:\n\n```\nSMS_DRIVER=nexmo\nNEXMO_API_KEY=foo\nNEXMO_API_SECRET=bar\nCLOCKWORK_API_KEY=baz\nTEXTLOCAL_API_KEY=baz\nREQUESTBIN_PATH=foo\nAWS_SNS_API_KEY=foo\nAWS_SNS_API_SECRET=bar\nAWS_SNS_API_REGION=baz\nMAIL_SMS_DOMAIN=my.sms-gateway.com\nTWILIO_ACCOUNT_ID=foo\nTWILIO_API_TOKEN=bar\n```\n\nInstallation for Lumen\n----------------------\n\nThe installation process with Lumen is identical to that for Laravel, although if you wish to use the facade you will need to uncomment the appropriate section of `bootstrap/app.php` as usual.\n\nUsage\n-----\n\nOnce the package is installed and configured, you can use the facade to send SMS messages:\n\n```php\nuse SMS;\n\n$msg = [\n    'to'      =\u003e '+44 01234 567890',\n    'content' =\u003e 'Just testing',\n];\nSMS::send($msg);\n```\n\nOr fetch it from the app:\n\n```php\n$msg = [\n    'to'      =\u003e '+44 01234 567890',\n    'content' =\u003e 'Just testing',\n];\n$sms = app()['sms']\n$sms-\u003esend($msg);\n```\n\nOr resolve the interface `Matthewbdaly\\SMS\\Contracts\\Client`:\n\n```php\n$msg = [\n    'to'      =\u003e '+44 01234 567890',\n    'content' =\u003e 'Just testing',\n];\n$sms = app()-\u003emake('Matthewbdaly\\SMS\\Contracts\\Client');\n$sms-\u003esend($msg);\n```\n\nHere we use the `app()` helper, but you'll normally want to inject it into a constructor or method of another class.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewbdaly%2Flaravel-sms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewbdaly%2Flaravel-sms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewbdaly%2Flaravel-sms/lists"}