<?php
|
|
|
|
use Illuminate\Foundation\Inspiring;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Console Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This file is where you may define all of your Closure based console
|
|
| commands. Each Closure is bound to a command instance allowing a
|
|
| simple approach to interacting with each command's IO methods.
|
|
|
|
|
*/
|
|
|
|
Artisan::command('inspire', function() {
|
|
$this->comment(Inspiring::quote());
|
|
})->describe('Display an inspiring quote');
|
|
|
|
|
|
/*
|
|
Artisan::command('score', function(){
|
|
|
|
$tweet = App\Tweet::where(['id'=>27])->first();
|
|
$score = $tweet->mission->score($tweet->team);
|
|
|
|
event(new App\Events\ScoreUpdatedEvent($tweet->team,
|
|
$tweet->mission, $score, $tweet->mission->complete($tweet->team), $tweet->team->total_score()));
|
|
|
|
$this->comment("Score: $score");
|
|
|
|
});
|
|
*/
|
|
|
|
Artisan::command('get_tweet', function(){
|
|
|
|
$id = '883471631200296961';
|
|
$tweet = Twitter::getTweet($id);
|
|
|
|
$this->comment(json_encode($tweet));
|
|
|
|
});
|
|
|
|
|
|
Artisan::command('add_webhook', function(){
|
|
|
|
$response = Twitter::post('/account_activity/all/:env_name/webhooks.json', [
|
|
'url' => ''
|
|
]);
|
|
|
|
$response = Twitter::post('/account_activity/all/prod/subscriptions.json');
|
|
|
|
});
|
|
|