PHP code example of sharpapi / laravel-hr-job-description

1. Go to this page and download the library: Download sharpapi/laravel-hr-job-description 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-job-description example snippets




namespace App\Http\Controllers;

use GuzzleHttp\Exception\GuzzleException;
use SharpAPI\HrJobDescription\HrJobDescriptionService;
use SharpAPI\HrJobDescription\Dto\JobDescriptionParameters;

class JobController extends Controller
{
    protected HrJobDescriptionService $jobDescriptionService;

    public function __construct(HrJobDescriptionService $jobDescriptionService)
    {
        $this->jobDescriptionService = $jobDescriptionService;
    }

    /**
     * @throws GuzzleException
     */
    public function generateJobDescription()
    {
        $jobDescriptionParameters = new JobDescriptionParameters(
            name: "PHP Senior Engineer",
            company_name: "ACME LTD",   // optional
            minimum_work_experience: "5 years",   // optional
            minimum_education: "Bachelor Degree",   // optional
            employment_type: "full time",   // optional
            

use GuzzleHttp\Exception\ClientException;

try {
    $statusUrl = $this->jobDescriptionService->generateJobDescription($jobDescriptionParameters);
} catch (ClientException $e) {
    echo $e->getMessage();
}
bash
php artisan vendor:publish --tag=sharpapi-hr-job-description