26 lines
572 B
PHP
26 lines
572 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\RedirectResponse;
|
|
use Illuminate\View\View;
|
|
|
|
class LegacyLayoutController extends Controller
|
|
{
|
|
public function show(string $path = ''): View|RedirectResponse
|
|
{
|
|
if (! auth()->check()) {
|
|
return redirect()->route('login');
|
|
}
|
|
|
|
$targetUrl = $path !== ''
|
|
? url($path)
|
|
: route('dashboard.index');
|
|
|
|
return view('layout.core', [
|
|
'site' => config('app.stage', 'DEV'),
|
|
'initialUrl' => $targetUrl,
|
|
]);
|
|
}
|
|
}
|