fipamo/app/Http/Controllers/DashController.php

40 lines
994 B
PHP
Raw Normal View History

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Services\SettingsService;
use App\Services\AuthService;
use App\Services\PaginateService;
class DashController extends Controller
{
protected $settings;
protected $pages;
public function __construct(
SettingsService $settingsService,
AuthService $authService,
PaginateService $paginateService,
) {
$this->settings = $settingsService;
$this->auth = $authService;
$this->pages = $paginateService;
}
public function start(Request $request)
{
$status = session('handle') !== null ? true : false;
$result = [];
if ($status) {
$result = $this->pages->getPage(1, 4);
//var_dump($result['pages'][1]['media'][0]['type']);
}
return view('back.start', [
"status" => $status,
"result" => $result,
"title" => "Fipamo Dash"
]);
}
}