The apache 2 server on Linux is configured and laravel 5.2 is installed, there is a php script that listens to the socket, is it possible to call Event :: fire for laravel from this script?
- @totorro frequent flashing of italics and plain text only worsens readability, honestly - etki
- @Etki, on the contrary, it's better for me when the main "game" characters are highlighted. I first look at them - I understand that I can answer, and then I read the question. But ok, the message understood. - torokhkun
- one@totorro for this there are tags - etki
- one@totorro: agree with Etki. It is much better to put the correct tags (if they are not already there). About italics in more detail here: When should I use inline selection for a code? - Nick Volynkin ♦
|
1 answer
in the routes added processing post request
Route::post('/zb', 'ZBController@post');
using curl from script I send data
$url = 'http://localhost/zb'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($zmsg, '', '&')); $out = curl_exec($ch); echo $out; curl_close($ch); $ zmsg is an object that I fill out in the script in more detail you can see in curl manuals
I receive data in the controller and raise an event.
public function post(Request $request) { event(new ZbMsgRecieved($request->all())); } |