public function setStatus($monitor, $status)
    {
        Statuses::where('monitor', $monitor)->delete();

        Statuses::create(['monitor' => $monitor,
                          'healthy' => $status]);

        $this->status = Statuses::all();
    }
public function setStatus($monitor, $status)
    {
        Statuses::where('monitor', $monitor)->delete();

        Statuses::create(['monitor' => $monitor,
                          'healthy' => $status]);

        $this->status = Statuses::all();
    }
public function setStatus ( $ monitor , $ status ) { Statuses :: where ( 'monitor' , $ monitor ) -> delete ( ) ; Statuses :: create ( [ 'monitor' => $ monitor , 'healthy' => $ status ] ) ; $ this -> status = Statuses :: all ( ) ; }
Set the status of a specific monitor

@param  string  $monitor
@param  bool  $status
@return void
Set the status of a specific monitor