moh4git / maystro-webhook
Maystro Webhook
Installs: 1 078
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/moh4git/maystro-webhook
README
Maystro delivery webhook trait package
How to use:
Installation
You can install the package via composer:
composer require moh4git/maystro-webhook
Now run this php artisan command :
php artisan webhook:install
This command will create a controller inside : app\Http\Controllers\MaystroDelivery
namespace App\Http\Controllers\MaystroDelivery;
use App\Http\Controllers\Controller;
use MaystroWebhook\MaystroWebhook;
use Illuminate\Http\Request;
class MaystroDeliveryController extends Controller
{
use MaystroWebhook;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
public function responseData()
{
\Log::debug(['log_type' => 'test1', 'data' => $this->response_data]);
return response('OK', 200);
}
}
Usage
Register the route https://yourdomainname.com/maystro/webhook/endpoint inside your Maystro account in webhooks tab