You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
391 B
21 lines
391 B
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use App\Models\Skill;
|
|
use Illuminate\Support\Str;
|
|
|
|
class SkillService
|
|
{
|
|
public function getSkillIds($skills)
|
|
{
|
|
$skillIds = [];
|
|
foreach ($skills as $value) {
|
|
$skill = Skill::where('code', $value)->first();
|
|
if ($skill) {
|
|
$skillIds[] = $skill->id;
|
|
}
|
|
}
|
|
return $skillIds;
|
|
}
|
|
}
|
|
|