Add Team model and controller from upstream

This commit is contained in:
Remco
2026-01-24 21:08:40 +01:00
parent e233b55c34
commit 858143a69e
3 changed files with 66 additions and 11 deletions
@@ -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'));
}
}