20-02-2026
This commit is contained in:
parent
a8b395e20d
commit
a00c42e770
252 changed files with 28785 additions and 8907 deletions
|
|
@ -4,9 +4,8 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Request;
|
||||
use Util;
|
||||
|
||||
|
|
@ -19,20 +18,28 @@ class HomeController extends Controller
|
|||
*/
|
||||
public function __construct() {}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
if (!Auth::check()) {
|
||||
if (! Auth::check()) {
|
||||
return redirect('login');
|
||||
}
|
||||
|
||||
return redirect('home');
|
||||
}
|
||||
|
||||
//login / Dashboard
|
||||
public function newsArchive(): \Illuminate\View\View
|
||||
{
|
||||
return view('dashboard.news_archive', [
|
||||
'currentNews' => \App\Models\DashboardNews::getActiveNews(),
|
||||
'archiveNews' => \App\Models\DashboardNews::getArchiveNews(),
|
||||
]);
|
||||
}
|
||||
|
||||
// login / Dashboard
|
||||
public function show()
|
||||
{
|
||||
|
||||
if (!Auth::check()) {
|
||||
if (! Auth::check()) {
|
||||
return redirect('login');
|
||||
}
|
||||
|
||||
|
|
@ -41,17 +48,17 @@ class HomeController extends Controller
|
|||
'now' => Carbon::now(),
|
||||
'dashboardNews' => \App\Models\DashboardNews::getActiveNews(),
|
||||
];
|
||||
|
||||
return view('home', $data);
|
||||
}
|
||||
|
||||
|
||||
public function loadingModal()
|
||||
{
|
||||
|
||||
$data = Request::get('data');
|
||||
$target = Request::get('target');
|
||||
$response = "";
|
||||
if ($data === "data_protection") {
|
||||
$response = '';
|
||||
if ($data === 'data_protection') {
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => true,
|
||||
|
|
@ -59,21 +66,21 @@ class HomeController extends Controller
|
|||
];
|
||||
$response = view('legal.data_protect_de', $data)->render();
|
||||
}
|
||||
if ($data === "imprint") {
|
||||
if ($data === 'imprint') {
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
$response = view('legal.imprint_de', $data)->render();
|
||||
}
|
||||
if ($data === "shop_term_of_use") {
|
||||
if ($data === 'shop_term_of_use') {
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
$response = view('legal.shop_term_of_use_de', $data)->render();
|
||||
}
|
||||
if ($data === "agb") {
|
||||
if ($data === 'agb') {
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
|
|
@ -81,7 +88,7 @@ class HomeController extends Controller
|
|||
$response = view('legal.agb_de', $data)->render();
|
||||
}
|
||||
if (Request::ajax()) {
|
||||
return response()->json(['response' => $response, 'target' => $target]);
|
||||
return response()->json(['response' => $response, 'target' => $target]);
|
||||
}
|
||||
abort(404);
|
||||
}
|
||||
|
|
@ -154,6 +161,7 @@ class HomeController extends Controller
|
|||
'isMivitaShop' => Util::isMivitaShop(),
|
||||
'yard_instance' => 'webshop',
|
||||
];
|
||||
|
||||
return view('legal.data_protected', $data);
|
||||
}
|
||||
|
||||
|
|
@ -166,6 +174,7 @@ class HomeController extends Controller
|
|||
'yard_instance' => 'webshop',
|
||||
|
||||
];
|
||||
|
||||
return view('legal.agb', $data);
|
||||
}
|
||||
|
||||
|
|
@ -177,6 +186,7 @@ class HomeController extends Controller
|
|||
'user_shop' => Util::getUserShop(),
|
||||
'yard_instance' => 'webshop',
|
||||
];
|
||||
|
||||
return view('legal.imprint', $data);
|
||||
}
|
||||
|
||||
|
|
@ -195,19 +205,20 @@ class HomeController extends Controller
|
|||
$user->confirmed = 1;
|
||||
$user->confirmation_date = now();
|
||||
$user_auto_login = true;
|
||||
//nur bei der ersten Verifizierung den user auto login
|
||||
// nur bei der ersten Verifizierung den user auto login
|
||||
}
|
||||
//wird nun in WizardController::releaseAccount() auf null gesetzt
|
||||
//$user->confirmation_code = null;
|
||||
//$user->confirmation_code_to = null;
|
||||
//$user->confirmation_code_remider = 0;
|
||||
// wird nun in WizardController::releaseAccount() auf null gesetzt
|
||||
// $user->confirmation_code = null;
|
||||
// $user->confirmation_code_to = null;
|
||||
// $user->confirmation_code_remider = 0;
|
||||
$user->save();
|
||||
|
||||
//Login!
|
||||
// Login!
|
||||
if ($user_auto_login) {
|
||||
Auth::login($user);
|
||||
}
|
||||
$url = Util::getMyMivitaUrl();
|
||||
|
||||
return redirect($url);
|
||||
}
|
||||
|
||||
|
|
@ -215,20 +226,22 @@ class HomeController extends Controller
|
|||
{
|
||||
return view('status.status_register');
|
||||
}
|
||||
|
||||
public function statusVerify()
|
||||
{
|
||||
return view('status.status_verify');
|
||||
}
|
||||
|
||||
public function statusError()
|
||||
{
|
||||
return view('status.status_error');
|
||||
}
|
||||
|
||||
public function notFound()
|
||||
{
|
||||
return view('status.not_found');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
@ -236,7 +249,7 @@ class HomeController extends Controller
|
|||
{
|
||||
|
||||
$data = Request::all();
|
||||
if ($data['user_id'] === "new") {
|
||||
if ($data['user_id'] === 'new') {
|
||||
if (User::where('email', $data['email'])->count()) {
|
||||
return json_encode(false);
|
||||
}
|
||||
|
|
@ -245,6 +258,7 @@ class HomeController extends Controller
|
|||
return json_encode(false);
|
||||
}
|
||||
}
|
||||
|
||||
return json_encode(true);
|
||||
}
|
||||
|
||||
|
|
@ -253,21 +267,23 @@ class HomeController extends Controller
|
|||
return view('status.user_blocked');
|
||||
}
|
||||
|
||||
public function backToShop($reference = "")
|
||||
public function backToShop($reference = '')
|
||||
{
|
||||
|
||||
if ($reference) {
|
||||
$ShoppingPayment = ShoppingPayment::where('reference', $reference)->first();
|
||||
if ($ShoppingPayment && $ShoppingPayment->status === 'success') {
|
||||
$user = Auth::user();
|
||||
//is form wizard create payment
|
||||
// is form wizard create payment
|
||||
if ($user && ($user->wizard == 13 || $user->wizard == 20)) {
|
||||
$user->wizard = 15; //realese Payments
|
||||
$user->wizard = 15; // realese Payments
|
||||
$user->save();
|
||||
|
||||
return redirect(route('wizard_create', [15]));
|
||||
}
|
||||
} else {
|
||||
\Session()->flash('alert-error', __('msg.error_occurred_with_order'));
|
||||
|
||||
return redirect(url('/'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue