The Laracasts PHPStorm theme.
https://www.dropbox.com/s/f4l3qc2falnvq61/laracasts_theme_updated.icls
(Add to ~/Library/Preferences/WebIde80/colors on Mac.)
| <?php | |
| class ExampleTest extends IntegrationTest | |
| { | |
| /** test */ | |
| public function it_verifies_that_pages_load_properly() | |
| { | |
| $this->visit('/'); | |
| } |
| <?php | |
| namespace App\Console\Commands; | |
| use Illuminate\Console\GeneratorCommand; | |
| use Symfony\Component\Console\Input\InputArgument; | |
| use Symfony\Component\Console\Input\InputOption; | |
| class PivotMigrationMakeCommand extends GeneratorCommand | |
| { |
The Laracasts PHPStorm theme.
https://www.dropbox.com/s/f4l3qc2falnvq61/laracasts_theme_updated.icls
(Add to ~/Library/Preferences/WebIde80/colors on Mac.)
| /** | |
| * Destroy the user's session (logout). | |
| * | |
| * @return Response | |
| */ | |
| public function destroy() | |
| { | |
| Auth::logout(); | |
| flash()->info('You are now logged out.'); |
| var gulp = require('gulp'); | |
| var phpspec = require('gulp-phpspec'); | |
| var run = require('gulp-run'); | |
| var notify = require('gulp-notify'); | |
| gulp.task('test', function() { | |
| gulp.src('spec/**/*.php') | |
| .pipe(run('clear')) | |
| .pipe(phpspec('', { notify: true })) | |
| .on('error', notify.onError({ |
| {{ Form::open(['data-remote', 'data-remote-success-message' => 'I have now done the thing.']) }} | |
| {{ Form::text('name') }} | |
| {{ Form::submit('Submit', ['data-confirm' => 'Are you sure?']) }} | |
| {{ Form::close() }} |
| <?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 ../../../? |
| <?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'); | |
| } |
| <?php | |
| // ... | |
| /** | |
| * Register a decorator for the command bus. | |
| * | |
| * @param string $decorator | |
| * @return CommandBus | |
| */ |
| <?php | |
| // ... | |
| public function store(RegistrationForm $form) | |
| { | |
| $form->validate(); // throws exception if fails | |
| // save stuff | |
| } |