1. Go to this page and download the library: Download jira/client 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/ */
jira / client example snippets
use Jira\Client\Client;
use Jira\Client\Configuration;
$client = new Client(new Configuration(
host: 'https://your-domain.atlassian.net',
username: 'jira-username',
password: 'jira-password',
));
use Jira\Client\Client;
use Jira\Client\Configuration;
$client = new Client(new Configuration(
host: 'https://your-domain.atlassian.net',
username: 'jira-username',
accessToken: 'jira-token',
));
use Illuminate\Support\ServiceProvider;
use Jira\Client\Configuration;
namespace App\Providers;
class AppServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->app->singleton(Configuration::class, function () {
return new Configuration(
host: config('services.jira.host'),
username: config('services.jira.username'),
password: config('services.jira.password'),
)
});
}
}