This file contains hidden or 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 | |
public function index() | |
{ | |
if(Input::get('sort')) { | |
$this->offices->sort(Input::get('sort'), Input::get('direction')); | |
} | |
$offices = $this->offices->all(); | |
return View::make('app.offices.list', compact('offices')); | |
} |
This file contains hidden or 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 Infrastructure\Database; | |
use DateTime, | |
Domain\Person\PersonEntity as Person, | |
Domain\Person\Name, | |
Domain\Person\Email; | |
class ExamplePersonDomainObjectTransformer extends AbstractTransformer | |
{ |
This file contains hidden or 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 | |
use Illuminate\Support\MessageBag, | |
Illuminate\Validation\Factory; | |
/** | |
* A simple wrapper for Laravel's native validator. Allows | |
* validation rules to be modified pre-validation based on | |
* input and can be used to throw an exception with the | |
* input and validation failures |
This file contains hidden or 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 | |
class EloquenFooRepository | |
{ | |
/** | |
* The base eloquent model | |
* @var Eloquent | |
*/ | |
protected $model; |
This file contains hidden or 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 | |
class ContactFormHandler | |
{ | |
public function __construct(ContactFormTemplate $template, ContactFormValidator $validator, ContactFormMailer $mailer) | |
{ | |
$this->template = $template; | |
$this->validator = $validator; | |
$this->mailer = $mailer; | |
} |
This file contains hidden or 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 | |
class BaseController extends Controller | |
{ | |
public function callAction($method, $params) | |
{ | |
$ajax = Request::isAjax(); | |
try { | |
return parent::callAction($method, $params); |
This file contains hidden or 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 | |
//Template for all required environment variables | |
return array( | |
'DB_USER' => '', | |
'DB_PASS' => '', | |
'DB_DATABASE' => '', | |
'BUGSNAG_KEY' => '', | |
'NEW_RELIC_APPNAME' => '' | |
); |
This file contains hidden or 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 | |
class ServiceContainer | |
{ | |
protected $services = []; | |
protected function setCallable($serviceKey, Callable $service) | |
{ | |
$this->services[$serviceKey] = $service; | |
return $this; |
This file contains hidden or 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
#!/bin/bash | |
#Retrieves an environment variable from the correct environment file | |
#Based on the specified environment | |
#Example: getEnvVariable local DB_USER VARIABLE | |
#Will attempt to retrieve the DB_USER array value from the file at .env.local.php | |
#And then store the result in VARIABLE | |
getEnvVariable(){ | |
local RESULT=$3 | |
local LOCAL_RESULT=$(php -r ' | |
$file = getcwd() . "/.env." . trim($argv[1]) . ".php"; |
This file contains hidden or 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 | |
class FacebookUrlHelper | |
{ | |
private $graphApiUrl; | |
private $fbHostname; | |
public function __construct($graphApiUrl = 'http://graph.facebook.com', $fbHostname = 'facebook.com') | |
{ |
OlderNewer