Skip to content

Commit

Permalink
20-10-2021
Browse files Browse the repository at this point in the history
  • Loading branch information
gtsorho committed Oct 20, 2021
1 parent aa3ab0c commit b7d2109
Show file tree
Hide file tree
Showing 1,734 changed files with 171,376 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/Events/MyEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public function __construct($message)

public function broadcastOn()
{
$channelkey = $this->message['channelkey'];
return ['my-channel'.$channelkey];
$channelkey = $this->message['channelkey'];
return ['my-channel'.$channelkey];
}

public function broadcastAs()
{
return 'my-event';
return 'my-event';
}
}
4 changes: 2 additions & 2 deletions app/Http/Controllers/espcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

class espcontroller extends Controller
{

public function __construct()
{
$this->middleware('auth:api');
Expand Down Expand Up @@ -95,7 +94,8 @@ public function avg(espdata $espdata){
$dateData->push($sendDate);
$averageData->push($message);
}

// dd($averageData, $dateData);

$monthlyAgerage =espdata::select(DB::raw('avg(rain) rainAvg, avg(light) lightAvg, avg(moisture) moistureAvg, avg(temperature) temperatureAvg, avg(humidity) humidityAgv'))->whereYear('created_at', $todayYear)->whereMonth('created_at', $todayMonth)->get();

$user = User::latest('id', auth()->guard('api')->id())->first();
Expand Down
7 changes: 6 additions & 1 deletion espcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
Client secret: Dt5cyFSoui9cAdqiGCF3pPpZXoV0CvgbK8X8WA0b
Password grant client created successfully.
Client ID: 2
Client secret: 0PmAZqpDaEuRInU9ITm85JsCpwajBaFgEsdzirqT
Client secret: 0PmAZqpDaEuRInU9ITm85JsCpwajBaFgEsdzirqT


new
Client ID: 1
Client secret: YIuG5kLCBTrgvsi23t21HAlWGQ3wwszqgUMdvBOo
Loading

0 comments on commit b7d2109

Please sign in to comment.