KTV/app/View/Components/SelectDropdown.php
allen.yan 2769e82a37 功能調整
API 收到包廂指令先押資料
加入 包廂列表
加入 包廂控制介面
加入 包廂記錄
補上正規劃
20250729
2025-07-29 00:24:03 +08:00

35 lines
929 B
PHP

<?php
namespace App\View\Components;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Collection;
use Illuminate\View\Component;
class SelectDropdown extends Component
{
public Collection $options;
public ?string $fieldName;
public ?int $modelId;
public string|int|null $selected;
/**
* Create a new component instance.
*/
public function __construct( Collection $options, int|null $modelId = null, string|null $fieldName = null, string|int|null $selected = null)
{
//dd($options,$modelId,$fieldName,$selected);
$this->options = $options;
$this->fieldName = $fieldName;
$this->modelId = $modelId;
$this->selected = $selected;
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.select-dropdown');
}
}