Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xxl4 committed Oct 23, 2024
1 parent 057cb8b commit 35d44bc
Show file tree
Hide file tree
Showing 2 changed files with 324 additions and 27 deletions.
17 changes: 6 additions & 11 deletions src/Http/Controllers/Admin/GoogleAdsenseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,25 @@
use Google_Service_Adsense;
use stdClass;

class GoogleAdsenseController extends Controller
{
class GoogleAdsenseController extends Controller {
private $uid = null;

private $client = null;
private $service = null;

public function __construct()
{
public function __construct() {
$this->client = new Google_Client();
$this->client->addScope('https://www.googleapis.com/auth/adsense.readonly');
$this->client->addScope('https://www.googleapis.com/auth/adsense');
$this->client->addScope(config('GoogleAdsense.Scopes'));
$this->client->setAccessType('offline');
$this->client->setApprovalPrompt('force');
$this->client->setAuthConfig(config('GoogleAdsense.auth_config_file'));
}

public function index()
{
public function index() {
return view('googleadsense::index');
}

public function callback($uid)
{
public function callback($uid) {
$this->uid = $uid;
return view('googleadsense::callback', compact('uid'));
}
Expand Down
Loading

0 comments on commit 35d44bc

Please sign in to comment.