This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$id = isset($response['result']->post->ID) | |
? $response['result']->post->ID | |
: ( isset($response['result']->postID) | |
? $response['result']->postID | |
: ( isset($response['result']->id) | |
? $response['result']->id | |
: null | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$count = clone($model); | |
$count = $count->count('orders.id'); | |
$list = $model->skip( (\Paginator::getCurrentPage()-1) * $params['per_page'] )->take( $params['per_page'] )->get(); | |
$list = \Paginator::make( $list->all(), $count, $params['per_page'] ); | |
return $list; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var concat = require('gulp-concat'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var uglify = require('gulp-uglify'); | |
var ngAnnotate = require('gulp-ng-annotate'); | |
var bytediff = require('gulp-bytediff'); | |
var plumber = require('gulp-plumber'); | |
var rename = require('gulp-rename'); | |
gulp.task('app', function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace MyApp\Utils; | |
use Facebook\Facebook; | |
/** | |
* @class FacebookRepository Our repository, containing commonly used queries | |
*/ | |
class FacebookRepository | |
{ | |
/** @var Facebook */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace MyApp\Support\Memory; | |
trait SessionManager | |
{ | |
/** | |
* Starts session if required | |
* | |
* @return void | |
**/ | |
protected function startSession() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace MyApp\Utils; | |
use Facebook\Facebook; | |
use MyApp\Support\Memory\SessionManager; | |
/** | |
* @class FacebookRepository Our repository, containing commonly used queries | |
*/ | |
class FacebookRepository | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* ... */ | |
/** | |
* Gets currently logged-in user | |
* | |
* @param string $token | |
* @param array $params | |
* @return array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* ... */ | |
/** | |
* Gets Facebook login URL | |
* | |
* @param array $scope | |
* @return string | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace MyApp\Controllers; | |
use \BaseController; | |
class FacebookControler extends BaseController | |
{ | |
/** | |
* Facebook token manager | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace MyApp\Utils\Facebook; | |
use FacebookAds\Api; | |
use FacebookAds\Object\CustomAudience; | |
use FacebookAds\Object\Values\CustomAudienceTypes; | |
use Setting; | |
/** |
OlderNewer