static function getClient($username, $password) { return (new \Client())->where('api.basic_key', $username)->where('api.basic_secret', $password)->first(); }
/** * Constructs a new base controller. */ public function __construct() { $this->lrs = Helpers::getLrsFromAuth(); list($username, $password) = Helpers::getUserPassFromAuth(); $this->client = Helpers::getClient($username, $password); }