Skip to content

Instantly share code, notes, and snippets.

View hartmann-lars's full-sized avatar

Lars Hartmann hartmann-lars

View GitHub Profile
@hartmann-lars
hartmann-lars / MyModelObserver.php
Created February 27, 2018 23:52
Laravel Observer skeleton file
<?php
namespace App\Observer;
use App\Models\MyModel;
class MyModelObserver
{
public function retrieved(MyModel $myModel)
{
# Following is the configuration for adding WAN UPNP and binary Ping sensors along with uptime cards.
# Using default History settings and no sensor_templates.
# Every option to tweak it.
# Please note it might not be the correct ethical nor technical choice pinging Googles DNS.
# configuration.yaml binary_sensors for ping
# NB: Update core if you don't see them after adding them
binary_sensor:
- platform: ping