49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Fo;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Lib\Helpers\GamePeriodHelper;
|
|
use App\Models\GoldenCrushGame;
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
class GoldenCrushController extends Controller
|
|
{
|
|
/**
|
|
* Reuturn landing page.
|
|
*/
|
|
public function index(): View
|
|
{
|
|
$startVote = GamePeriodHelper::isGamePeriod();
|
|
|
|
return view('fo.pages.goldenCrush.golden-crush', ['startVote' => $startVote]);
|
|
}
|
|
|
|
/**
|
|
* End of participation landing page.
|
|
*/
|
|
public function endParticipation(): View
|
|
{
|
|
return $this->render('fo.pages.goldenCrush.end-of-participation');
|
|
}
|
|
|
|
/**
|
|
* End of game landing page.
|
|
*/
|
|
public function endGame(): View
|
|
{
|
|
return $this->render('fo.pages.goldenCrush.end-game');
|
|
}
|
|
|
|
/**
|
|
* Render video in view.
|
|
*
|
|
* @param string $view for inject videos.
|
|
*/
|
|
private function render(string $view): View
|
|
{
|
|
$videos = GoldenCrushGame::getVideos();
|
|
|
|
return view($view, compact('videos'));
|
|
}
|
|
}
|