lubos / google
CakePHP Google plugin
Installs: 190
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 5
Forks: 10
Open Issues: 2
Type:cakephp-plugin
Requires
- php: >=5.2.8
- cakephp/cakephp: ~2.0
- composer/installers: ~1.0
- lubos/opauth: ~1.0
This package is not auto-updated.
Last update: 2020-08-17 10:15:30 UTC
README
Requirements
Installlation
-
Use composer. Add following to the
composer.json
file:"require": { "lubos/google": "~1.0" }
And run
php composer.phar update
-
Install required plugins with all dependcies and configuration (done via composer)
-
Connect google's account with your application http://example.org/auth/google
-
Include needed model in your controller or anywhere you want to
$uses = array('Google.GoogleDriveFiles'); ... $data = $this->GoogleDriveFiles->listItems(); debug ($data);
$data = ClassRegistry::init('Google.GoogleDriveFiles')->listItems(); debug ($data);
Sample
-
Install CakePHP Google API Plugin sample
git clone --recursive https://github.com/LubosRemplik/CakePHP-Google-API-Plugin-sample.git google-sample-app
-
Create database & run bake, schema scripts
# basic cakephp installation cd google-sample-app/app chmod -R 777 tmp Console/cake bake db_config # schema Console/cake schema create -p Opauth
-
Configure - set google's credentials
Copy bootstrap.php.default to bootstrap.php and add your client_id, client_secret. You can get these details at https://code.google.com/apis/console/cp Config/bootstrap.php.default Config/bootstrap.php vim Config/bootstrap.php
Note You have to configure Opauth correctly