Added way to recieve text messages and printing them.
This commit is contained in:
27
app/Http/Controllers/Plivo.php
Normal file
27
app/Http/Controllers/Plivo.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Paper\Paper;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class Plivo extends Controller
|
||||
{
|
||||
/** @var Paper */
|
||||
private $paper;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->paper = new Paper();
|
||||
}
|
||||
|
||||
|
||||
public function recieveSms(Request $request)
|
||||
{
|
||||
if ($request->isMethod('post')) {
|
||||
$this->paper->sendPrint('SMS od '. $request->input('From'), $request->input('Text')."\n\n".date('d-m-Y H:i'), 'envelope-o');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -12,6 +12,6 @@ class VerifyCsrfToken extends BaseVerifier
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
'sms'
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user