forked from projects/fipamo
ro
2b437c0173
moved the page listing template over and made all of the apropriate changes so the CSS lines up as it should there was also a minor issue that was keeping the sub menu for the start pages from displaying so that was fixed
46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Services\PaginateService;
|
|
|
|
class DashController extends Controller
|
|
{
|
|
protected $pages;
|
|
|
|
public function __construct(
|
|
PaginateService $paginateService,
|
|
) {
|
|
$this->pages = $paginateService;
|
|
}
|
|
|
|
public function start()
|
|
{
|
|
$status = session('handle') !== null ? true : false;
|
|
$result = [];
|
|
if ($status) {
|
|
$result = $this->pages->getPage(1, 4);
|
|
}
|
|
return view('back.start', [
|
|
"status" => $status,
|
|
"result" => $result,
|
|
"title" => "Start"
|
|
]);
|
|
}
|
|
|
|
public function book($pageFilter = 'all', $pageNum = '1')
|
|
{
|
|
$status = session('handle') !== null ? true : false;
|
|
$result = [];
|
|
if ($status) {
|
|
$result = $this->pages->getPage($pageNum, 4, $pageFilter);
|
|
}
|
|
return view('back.book', [
|
|
"status" => $status,
|
|
"result" => $result,
|
|
"currentPage" => $pageNum,
|
|
"title" => "Pages"
|
|
]);
|
|
}
|
|
}
|