PHP code example of sharpapi / laravel-hr-related-skills
1. Go to this page and download the library: Download sharpapi/laravel-hr-related-skills library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sharpapi / laravel-hr-related-skills example snippets
namespace App\Http\Controllers;
use GuzzleHttp\Exception\GuzzleException;
use SharpAPI\HrRelatedSkills\HrRelatedSkillsService;
class SkillsController extends Controller
{
protected HrRelatedSkillsService $relatedSkillsService;
public function __construct(HrRelatedSkillsService $relatedSkillsService)
{
$this->relatedSkillsService = $relatedSkillsService;
}
/**
* @throws GuzzleException
*/
public function getRelatedSkills(string $skillName)
{
$statusUrl = $this->relatedSkillsService->relatedSkills(
$skillName,
'English', // optional language
10 // optional maximum quantity
);
$result = $this->relatedSkillsService->fetchResults($statusUrl);
return response()->json($result->getResultJson());
}
}