3
0
Fork 0
This repository has been archived on 2024-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
ThemeParkPlus-Panel/app/Http/Controllers/HomeController.php

60 lines
1.3 KiB
PHP
Raw Normal View History

2020-02-26 13:59:58 +00:00
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
2020-02-26 13:59:58 +00:00
use Illuminate\Support\Facades\DB;
2021-06-27 19:01:43 +00:00
use Illuminate\Support\Facades\Redirect;
2020-02-26 13:59:58 +00:00
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware(['auth', 'verified', '2fa']);
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function index()
{
2021-06-29 20:05:00 +00:00
if(!env('HOME_PAGE', false))
return redirect()->route('status');
2020-02-26 13:59:58 +00:00
return view('home')->with([
2021-06-29 20:05:00 +00:00
'message' => \App\Message::orderByDesc('id')->first()
2020-02-26 13:59:58 +00:00
]);
}
public function status()
{
return view('status');
}
public function photo() {
$photos = DB::table('actionfotos')
2022-09-04 18:48:29 +00:00
->join('attractions', 'attractions.id', '=', 'actionfotos.ride')
->where('actionfotos.uuid', '=', Auth::user()->uuid)
->select('actionfotos.base64')
->get()->all();
2020-02-26 13:59:58 +00:00
return view('photo', [
'photos' => $photos
]);
}
2020-02-26 13:59:58 +00:00
2021-06-27 19:01:43 +00:00
public function store()
{
return Redirect::to(env('STORE_URL', 'https://sbdplugins.nl'));
}
2020-02-26 13:59:58 +00:00
}