liyinglin 2 years ago
parent 5b9c9d2a14
commit 21a0415216

@ -374,6 +374,17 @@ class ProjectController extends CommonController
"class" => "form form-horizontal validate-form",
"model" => $vo
]);
$project_ids = auth()->user()->project_ids;
if ($project_ids) {
$project_ids = explode(',', $project_ids);
}
$form->modify("project_id", "select", [
"choices" => (new Project())->where(function ($query) use ($project_ids) {
if ($project_ids) {
$query->whereIn("id", $project_ids);
}
})->get()->pluck("name", "id")->toArray()
]);
$form->add("_previous", "hidden", ["value" => (url()->previous())]);
return view($this->bladePath . ".asksubmit_create", compact("form"));
}

Loading…
Cancel
Save