fipamo/app/Http/Controllers/Front/StartController.php

39 lines
1.1 KiB
PHP
Raw Normal View History

<?php
namespace App\Http\Controllers\Front;
use App\Services\SettingsService;
use App\Http\Controllers\Controller;
use App\Services\AuthService;
class StartController extends Controller
{
protected $settings;
protected $auth;
public function __construct(SettingsService $settingsService, AuthService $authService)
{
$this->settings = $settingsService;
$this->auth = $authService;
}
public function index($first = 00, $second = 00, $third = 00)
{
$global = $this->settings->getGlobal();
//check if configs are present
if (file_exists(env('FOLKS_PATH')) && file_exists(env('SETTINGS_PATH'))) {
if ($global['dynamicRender'] == 'true') {
if (is_numeric($first)) {
dd('index');
} else {
dd('pages');
}
} else {
return response()->file('../public/index.html');
}
} else {
return view('back.init', ["status" => false, "title" => "Set Up"]);
}
}
}