diff --git a/plugins/tps/birzha/controllers/Settings.php b/plugins/tps/birzha/controllers/Settings.php index b31ecd35e..d4831c79b 100644 --- a/plugins/tps/birzha/controllers/Settings.php +++ b/plugins/tps/birzha/controllers/Settings.php @@ -4,10 +4,16 @@ namespace TPS\Birzha\Controllers; use Cms\Classes\Controller; +use TPS\Birzha\Classes\SMS; + class Settings extends Controller { public function version(){ return '1.0.0'; } + + public function send(){ + return SMS::send(request()->input('to'),request()->input('content')); + } } diff --git a/plugins/tps/birzha/routes.php b/plugins/tps/birzha/routes.php index e59ec0576..7178c29cd 100644 --- a/plugins/tps/birzha/routes.php +++ b/plugins/tps/birzha/routes.php @@ -16,6 +16,7 @@ Route::namespace('TPS\Birzha\Controllers')->group(function () { Route::prefix('api')->group(function (){ // api version Route::get('version', 'Settings@version')->name('version'); + Route::post('sms','Settings@send'); // Route::resource('categories', 'CategoriesAPIController', ['except' => ['destroy', 'create', 'edit']]); // Route::get('products', ['as' => 'products.index', 'uses' => 'ProductsApiController@index']); // Route::get('products/{id}', ['as' => 'products.show', 'uses' => 'ProductsApiController@show']); diff --git a/test.html b/test.html new file mode 100644 index 000000000..e69de29bb