public function updateLog($type)
{
$log = new Log();
if ($type == 'fetching') {
$log->case_type = "fetching";
} else {
if ($type == 'dashboard_update') {
$log->case_type = "dashboard_update";
} else {
if ($type == 'stats') {
$log->case_type = 'stats';
} else {
if ($type == 'publishments') {
$log->case_type = 'publishments';
} else {
if ($type == 'publishment_detail') {
$log->case_type = 'publishment_detail';
}
}
}
}
}
$log->save();
}
/** * Execute the console command. * * @return mixed */ public function handle() { if (isFacebookLinked()) { $this->update->collectPrivateConversations(); $this->update->collectPosts(); } if (isTwitterLinked()) { $this->update->collectMentions(); $this->update->collectDirectMessages(); } $this->log->updateLog('fetching'); }