Add Team model and controller from upstream

This commit is contained in:
Remco committed 2026-01-24 21:08:40 +01:00
1 parent e233b55c34
commit 858143a69e
3 files changed
+66 -11

No files matched your search

@@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Community\Teams;
use App\Http\Controllers\Controller;
use App\Models\Community\Teams\WebsiteTeam;
use Illuminate\Http\Request;
class WebsiteTeamController extends Controller
{
public function index()
{
$teams = WebsiteTeam::where('is_active', true)
->withCount('applications')
->get();
return view('community.teams', compact('teams'));
}
public function show($id)
{
$team = WebsiteTeam::where('is_active', true)
->with('applications')
->findOrFail($id);
return view('community.team-applications', compact('team'));
}
}