Jira PHP for Laravel is a PHP API client that provides access to the Jira API and the Service Desk API with added functionality. It is an excellent package if you are looking for an easy and convenient way to integrate Jira with your Laravel project.
To get started with the package, follow these simple steps:
Install the package by running the following command:
composer require devmoath/jira-laravel
This command will download and install the package and its dependencies.
Publish the configuration file by running the following command:
php artisan vendor:publish --provider="Jira\Laravel\ServiceProvider"
This command will create a
config/jira.phpconfiguration file in your project. The configuration file contains the default settings for the package, including the Jira username, password, and host. You can modify this file to suit your needs using environment variables such as:
JIRA_USERNAME=USERNAME JIRA_PASSWORD=PASSWORD JIRA_HOST=jira.domain.com
Use the Jira facade to access the available functions.
Once you have installed and configured the package, you can start using the Jira facade to access the available functions. The Jira facade provides a convenient way to access the package's functionality without having to create a new instance of the client class every time you need to make an API call. Here's an example of how to use the Jira facade to search for issues:
use Jira\Laravel\Facades\Jira; $result = Jira::issues()->search(); echo $result['issues']['key']; // KEY-1000
In this example, we're using the
search function to search for issues in Jira. The function returns an array of issues, and we're using
echo to display the key of the first issue in the array. You can use other functions available in the package to perform different operations on Jira issues.
For more details on how to use the package, check out the GitHub repository at devmoath/jira-php. The repository contains documentation for the package, including examples of how to use the different functions available in the package. It also contains issues and pull requests, which you can use to report bugs or suggest improvements to the package.
In conclusion, Jira PHP for Laravel is an excellent package that makes it easy to integrate Jira with your Laravel project. It provides a convenient way to access the Jira API and the Service Desk API with added functionality. With this package, you can perform different operations on Jira issues, such as creating, updating, or deleting issues.