Initial commit

This commit is contained in:
root
2026-05-09 17:28:23 +02:00
commit 9d73f82529
5575 changed files with 281989 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers;
use App\Models\RadioGiveaway;
use Illuminate\Http\RedirectResponse;
use Illuminate\View\View;
class RadioGiveawayController extends Controller
{
public function index(): View
{
$giveaways = RadioGiveaway::where('is_active', true)
->orderBy('starts_at', 'desc')
->get();
return view('community.radio.giveaways.index', ['giveaways' => $giveaways]);
}
public function show(RadioGiveaway $giveaway): View|RedirectResponse
{
if (! $giveaway->is_active) {
return redirect()->route('radio.giveaways.index')->with('error', __('radio.not_active'));
}
return view('community.radio.giveaways.show', ['giveaway' => $giveaway]);
}
}