mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
40 lines
811 B
PHP
40 lines
811 B
PHP
<?php
|
|
|
|
namespace App\View\Components;
|
|
|
|
use App\Models\Mod;
|
|
use Illuminate\Contracts\View\View;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\View\Component;
|
|
|
|
class ModList extends Component
|
|
{
|
|
/**
|
|
* The mods to display.
|
|
*
|
|
* @var Collection<int, Mod>
|
|
*/
|
|
public Collection $mods;
|
|
|
|
public string $versionScope;
|
|
|
|
/**
|
|
* Create a new component instance.
|
|
*
|
|
* @param Collection<int, Mod> $mods
|
|
*/
|
|
public function __construct(Collection $mods, string $versionScope)
|
|
{
|
|
$this->mods = $mods;
|
|
$this->versionScope = $versionScope;
|
|
}
|
|
|
|
public function render(): View
|
|
{
|
|
return view('components.mod-list', [
|
|
'mods' => $this->mods,
|
|
'versionScope' => $this->versionScope,
|
|
]);
|
|
}
|
|
}
|