Пример #1
0
        $classify_one_predictions = $response['predictions'];
    }
} else {
    if (isset($_POST["action"]) && $_POST["action"] == "submitImageList") {
        $response = processImageList();
        if (isset($response) && $response['success'] && is_numeric($response['id']) && $response['id'] > 0) {
            $classify_many_id = $response["id"];
        }
    } else {
        if (isset($_GET['classify_many']) && is_numeric($_GET['classify_many'])) {
            $classify_many_id = $_GET['classify_many'];
        }
    }
}
if (isset($classify_many_id) && is_numeric($classify_many_id)) {
    $classify_many_predictions = ClassifyManySample::where('classify_many_id', '=', $classify_many_id)->with('_class')->get()->toArray();
    $current_page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
    $items_per_page = 15;
    $current_items = array_slice($classify_many_predictions, $items_per_page * ($current_page - 1), $items_per_page);
    $paginator = new Illuminate\Pagination\LengthAwarePaginator($current_items, count($classify_many_predictions), $items_per_page, $current_page);
    $paginator->setPath('classifier.php');
    $paginator->appends(['classify_many' => $classify_many_id]);
    $presenter = new Landish\Pagination\Materialize($paginator);
}
$title = "Classifier";
include_once "include/header.inc.php";
?>

<div class="section">
    <div class="row">
        <div class="col s12">