Skip to content

Instantly share code, notes, and snippets.

View franzose's full-sized avatar

Yan Ivanov franzose

View GitHub Profile
@franzose
franzose / 01_repository.php
Created April 7, 2021 02:13
Query objects
<?php
class SomeEntityRepository extends EntityRepository
{
public function findThis()
{
// method body
}
public function findThat()
@franzose
franzose / ga_reporting.php
Last active August 15, 2021 18:11
Google Analytics Reporting API usage example
<?php
// composer require google/apiclient
require __DIR__ . '/vendor/autoload.php';
// This is the file obtained from Google during the service account creation process
// see these links:
// 1. https://console.developers.google.com/apis/credentials/serviceaccountkey
// 2. https://console.developers.google.com/iam-admin/serviceaccounts/create