Installer updates

Added probe.php
Added new installer views and controllers
Updated AuthController
Updated Middlewares
Updated Commands for installation process
This commit is contained in:
Manish Verma
2018-08-07 13:45:46 +05:30
parent 1ac0f42a58
commit 22d3bb4036
28 changed files with 1197 additions and 405 deletions

View File

@@ -0,0 +1,49 @@
<?php
namespace App\Http\Middleware;
use Closure;
class Redirect
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)
{
$root = $request->root(); //http://localhost/faveo/Faveo-Helpdesk-Pro-fork/public
$url = $this->setAppUrl($request);
if ($url == $root) {
return $next($request);
}
$seg = '';
$segments = $request->segments();
if (count($segments) > 0) {
foreach ($segments as $segment) {
$seg .= '/'.$segment;
}
}
$url = $url.$seg;
return redirect($url);
}
public function setAppUrl($request)
{
$url = $request->root();
if (isInstall()) {
$schema = new \App\Model\helpdesk\Settings\CommonSettings();
$row = $schema->getOptionValue('url', 'app_url', true);
if ($row) {
$url = $row->option_value;
}
}
return $url;
}
}