Integrating Laravel and WordPress
Here is how to integrate Laravel and WordPress to Streamline Content Transferring From Google Docs in Few Minutes.
<?php
namespace App;
class Google
{
public function client()
{
$client = new \Google_Client();
$client->setClientId(env('GOOGLE_CLIENT_ID'));
$client->setClientSecret(env('GOOGLE_CLIENT_SECRET'));
$client->setRedirectUri(env('GOOGLE_REDIRECT_URL'));
$client->setScopes(explode(',', env('GOOGLE_SCOPES')));
$client->setApprovalPrompt(env('GOOGLE_APPROVAL_PROMPT'));
$client->setAccessType(env('GOOGLE_ACCESS_TYPE'));
return $client;
}
public function doc($client)
{
$doc = new \Google_Service_Docs($client);
return $doc;
}
public function drive($client)
{
$drive = new \Google_Service_Drive($client);
return $drive;
}
public function service($client)
{
$service = new \Google_Service_Books($client);
return $service;
}
}
Written by oliverusselldev
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Laravel
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#