/** * Overloads default class properties from the options. * * Any of the provider options can be set here, such as app_id or secret. * * @param array provider options * @return void */ public function __construct(array $options = array()) { if (!$this->name) { // Attempt to guess the name from the class name $this->name = strtolower(get_class($this)); } if (empty($options['id'])) { throw new Exception('Required option not provided: id'); } $this->client_id = $options['id']; isset($options['callback']) and $this->callback = $options['callback']; isset($options['secret']) and $this->client_secret = $options['secret']; isset($options['scope']) and $this->scope = $options['scope']; $this->redirect_uri = \URL::to(\Request::path()); // '/'.ltrim(Laravel\URI::current(), '/'); }