This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccount/app/Http/Controllers/StatusController.php

37 lines
657 B
PHP
Raw Normal View History

2019-07-10 15:04:35 +00:00
<?php
namespace App\Http\Controllers;
use App\Exceptions\HTTPException;
use TaGeSo\APIResponse\Response;
class StatusController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
//
}
public function check(Response $response) {
$pdo = app('db')->getPdo();
$sth = $pdo->prepare("SELECT * FROM `failed_jobs`");
$sth->execute();
$res = $sth->fetchAll(\PDO::FETCH_ASSOC);
if(count($res) > 0 ){
throw new HTTPException(500, "Failed Jobs");
}
return $response;
}
//
}