Skip to content

Commit

Permalink
Merge pull request #5 from JoelESvensson/master
Browse files Browse the repository at this point in the history
Make all methods accessible through magic
  • Loading branch information
apictapx authored Nov 18, 2016
2 parents 1e1d935 + ca66fd3 commit 9af5631
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/InfluxDBFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ protected static function getFacadeAccessor()
return 'InfluxDB\Client';
}

/**
* @param array ...$params
* @return bool
*/
public static function writePoints(...$params)
public static function __callStatic($method, $arguments)
{
$instance = static::getFacadeRoot();

return $instance->selectDB(config('influxdb.database'))->writePoints(...$params);
return static::getFacadeRoot()
->selectDB(config('influxdb.database'))
->$method(...$arguments)
;
}
}
}

0 comments on commit 9af5631

Please sign in to comment.