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 | |
use Faker\Factory as Faker; | |
abstract class ApiTester extends TestCase { | |
/** | |
* @var int | |
*/ | |
protected $times = 1; |
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
<?= 'Add your Wii U username below'; ?> |
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 | |
// ... | |
public function store(RegistrationForm $form) | |
{ | |
$form->validate(); // throws exception if fails | |
// save stuff | |
} |
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 | |
$saveDir = './tests/acceptance/tmp'; | |
$stubDir = './tests/acceptance/stubs'; | |
$commandToGenerate = 'FooCommand'; | |
$I = new AcceptanceTester($scenario); | |
$I->wantTo('generate a command and handler class'); | |
// Is there a better way to call the Artisan command? Without having to expect the framework and do ../../../? |
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
/** | |
* Destroy the user's session (logout). | |
* | |
* @return Response | |
*/ | |
public function destroy() | |
{ | |
Auth::logout(); | |
flash()->info('You are now logged out.'); |
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 | |
class ExampleTest extends IntegrationTest | |
{ | |
/** test */ | |
public function it_verifies_that_pages_load_properly() | |
{ | |
$this->visit('/'); | |
} |
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 | |
// ... | |
/** | |
* Register a decorator for the command bus. | |
* | |
* @param string $decorator | |
* @return CommandBus | |
*/ |
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
@mixin linear-gradient($options...) { | |
background: -webkit-linear-gradient($details); | |
background: -moz-linear-gradient($details); | |
background: linear-gradient($details); | |
} | |
.foo { | |
@include linear-gradient(top, red, green); | |
} |
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 | |
// Option 1: the follow method immediately references the relationship and saves it. | |
class User extends Eloquent { | |
public function follows() | |
{ | |
return $this->belongsToMany(self::class, 'follows', 'follower_id', 'followed_id'); | |
} |
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 | |
use Faker\Factory as Faker; | |
class ApiTester extends TestCase { | |
/** | |
* @var Faker | |
*/ | |
protected $fake; |
OlderNewer