2020-10-26 16:01:14 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
|
|
|
|
|
use App\Models\Prizes;
|
|
|
|
|
use App\Models\Settings;
|
|
|
|
|
|
|
|
|
|
class TeaserController extends Controller
|
|
|
|
|
{
|
|
|
|
|
public function index() {
|
2020-11-04 13:51:22 +01:00
|
|
|
$settings = Settings::find(1)->select('start_date', 'end_date', 'activated_teaser', 'teaser_end_activity')->first();
|
2020-11-05 14:34:28 +01:00
|
|
|
if ($settings->activated_teaser === 1 && $settings->teaser_end_activity > now())
|
2020-11-09 10:00:19 +01:00
|
|
|
return view('front.basic.teaser', compact('settings'));
|
2020-11-04 13:51:22 +01:00
|
|
|
return redirect()->route('home');
|
2020-10-26 16:01:14 +01:00
|
|
|
}
|
|
|
|
|
}
|