Skip to content

Commit

Permalink
Merge pull request #1474 from mnich0ls/master
Browse files Browse the repository at this point in the history
Updated DatabaseFailedJobProvider
  • Loading branch information
jenssegers committed Apr 3, 2018
2 parents 7445ea6 + 88de90f commit 25abcc9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public function log($connection, $queue, $payload, $exception)
/**
* Get a list of all of the failed jobs.
*
* @return array
* @return object[]
*/
public function all()
{
$all = $this->getTable()->orderBy('_id', 'desc')->get()->all();

$all = array_map(function ($job) {
$job['id'] = (string) $job['_id'];
return $job;
return (object) $job;
}, $all);

return $all;
Expand All @@ -44,15 +44,15 @@ public function all()
* Get a single failed job.
*
* @param mixed $id
* @return array
* @return object
*/
public function find($id)
{
$job = $this->getTable()->find($id);

$job['id'] = (string) $job['_id'];

return $job;
return (object) $job;
}

/**
Expand Down

0 comments on commit 25abcc9

Please sign in to comment.