| Provider | Singleton | Instantiable | Configurable |
|---|---|---|---|
| Constant | Yes | No | No |
| Value | Yes | No | No |
| Service | Yes | No | No |
| Factory | Yes | Yes | No |
| Decorator | Yes | No? | No |
| Provider | Yes | Yes | Yes |
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
| sudo apt-get update | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' | |
| sudo apt-get install -y vim curl python-software-properties | |
| sudo add-apt-repository -y ppa:ondrej/php5 | |
| sudo apt-get update | |
| sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug |
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 | |
| // (string) $message - message to be passed to Slack | |
| // (string) $room - room in which to write the message, too | |
| // (string) $icon - You can set up custom emoji icons to use with each message | |
| public static function slack($message, $room = "engineering", $icon = ":longbox:") { | |
| $room = ($room) ? $room : "engineering"; | |
| $data = "payload=" . json_encode(array( | |
| "channel" => "#{$room}", | |
| "text" => $message, |
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 | |
| //To be added under Twig/Node/Switch.php | |
| /* | |
| * This file is part of Twig. | |
| * | |
| * (c) 2009 Fabien Potencier | |
| * (c) 2009 Armin Ronacher | |
| * |
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 | |
| if ( ! \function_exists('artisan_call')) | |
| { | |
| function artisan_call($command, array $parameters = array()) | |
| { | |
| $buffer = new \Symfony\Component\Console\Output\BufferedOutput(); | |
| \Artisan::call($command, $parameters, $buffer); |
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 | |
| trait EventGenerator | |
| { | |
| protected $pendingEvents = array(); | |
| protected function raise($event) | |
| { | |
| $this->pendingEvents[] = $event; | |
| } |
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 Faker\Factory as Faker; | |
| abstract class ApiTester extends TestCase { | |
| /** | |
| * @var Faker | |
| */ | |
| protected $fake; |
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 TransformerAbstract | |
| { | |
| private $fields; | |
| private $allowedFields = array('id', 'name', 'phone', 'email', 'bio', 'num_friends'); | |
| private $partialFields = array( | |
| 'id' => array('id', 'name'), | |
| 'info' => array('name', 'phone', 'email', 'bio'), | |
| 'bio' => array('bio') |
###Jeffrey Way (1) - Bootcamp
Jeffrey went through about 12 subjects one right after the other and gave tips along the way.
- Mail Drivers for mail notifications.
1. With Laravel 4.2 it’s easier to use APIs like Mailgun and Mandrill for e-mail notifications. This avoids using SMTP which is really cool.
- File Generators for generating schema migrations.
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 | |
| // located in the /app/filters.php | |
| /* some original code */ | |
| Route::filter('statistics.auth.basic', function() { | |
| $user = Request::getUser(); | |
| $password = Request::getPassword(); | |
| if (!App::environment('development') && |