2024-02-29 20:00:59 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
2024-03-04 00:49:05 +01:00
|
|
|
use App\Services\PaginateService;
|
2024-03-01 20:34:36 +01:00
|
|
|
|
2024-02-29 20:00:59 +01:00
|
|
|
class DashController extends Controller
|
|
|
|
{
|
2024-03-04 00:49:05 +01:00
|
|
|
protected $pages;
|
2024-02-29 20:00:59 +01:00
|
|
|
|
2024-03-01 20:34:36 +01:00
|
|
|
public function __construct(
|
2024-03-04 00:49:05 +01:00
|
|
|
PaginateService $paginateService,
|
2024-03-01 20:34:36 +01:00
|
|
|
) {
|
2024-03-04 02:50:14 +01:00
|
|
|
$this->pages = $paginateService;
|
2024-02-29 20:00:59 +01:00
|
|
|
}
|
|
|
|
|
2024-03-04 02:50:14 +01:00
|
|
|
public function start()
|
2024-02-29 20:00:59 +01:00
|
|
|
{
|
2024-03-04 00:49:05 +01:00
|
|
|
$status = session('handle') !== null ? true : false;
|
|
|
|
$result = [];
|
|
|
|
if ($status) {
|
|
|
|
$result = $this->pages->getPage(1, 4);
|
|
|
|
}
|
2024-03-02 01:16:24 +01:00
|
|
|
return view('back.start', [
|
2024-03-04 00:49:05 +01:00
|
|
|
"status" => $status,
|
|
|
|
"result" => $result,
|
2024-03-02 01:16:24 +01:00
|
|
|
"title" => "Fipamo Dash"
|
|
|
|
]);
|
2024-02-29 20:00:59 +01:00
|
|
|
}
|
|
|
|
}
|