Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
papamarfo authored Jun 5, 2020
1 parent 92fb476 commit 5316173
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,23 +218,23 @@ class UssdController extends Controller
{
public function index()
{
$ussd = Ussd::machine()
->setFromRequest([
'network',
'phone_number' => 'msisdn',
'sessionId' => 'UserSessionID',
'input' => 'msg'
])
->setInitialState(Welcome::class)
->setResponse(function (string $message, string $action) {
return [
'USSDResp' => [
'action' => $action,
'menus' => '',
'title' => $message
]
];
});
$ussd = Ussd::machine()
->setFromRequest([
'network',
'phone_number' => 'msisdn',
'sessionId' => 'UserSessionID',
'input' => 'msg'
])
->setInitialState(Welcome::class)
->setResponse(function (string $message, string $action) {
return [
'USSDResp' => [
'action' => $action,
'menus' => '',
'title' => $message
]
];
});

return response()->json($ussd->run());
}
Expand Down

0 comments on commit 5316173

Please sign in to comment.