Skip to content

Commit adb4462

Browse files
Update README.md
1 parent 7c4c7d5 commit adb4462

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

README.md

+62-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,62 @@
1-
# laravel-jira-rest-client
1+
# Jira API client for Laravel 5.x
2+
3+
Perform various operations of [Jira APIs](https://docs.atlassian.com/jira/REST/cloud/) with Laravel 5.x
4+
5+
## Installation
6+
7+
To get the latest version of `laravel-jira-rest-client`, simply add the following line to the require block of your `composer.json` file:
8+
```
9+
"repositories": [
10+
// ...
11+
12+
{
13+
"type": "git",
14+
"url": "https://github.com/vitaly-malashevsky/laravel-jira-rest-client.git"
15+
}
16+
],
17+
18+
"rjvandoesburg/laravel-jira-rest-client": "dev-master"
19+
```
20+
You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.
21+
22+
Once added to your laravel project, you will want to add the service provider.
23+
Find the `providers` key in your `config/app.php` file and register the service provider:
24+
25+
```
26+
'providers' => [
27+
// ...
28+
29+
Atlassian\JiraRest\JiraRestServiceProvider::class,
30+
],
31+
```
32+
33+
Also locate the `Aliases` key in your `config/app.php` file and register the Facade:
34+
35+
```
36+
'aliases' => [
37+
// ...
38+
39+
'Jira' => Atlassian\JiraRest\Facades\Jira::class,
40+
],
41+
```
42+
43+
Finally, run `php artisan vendor:publish` to copy the default config into your app's config directory.
44+
Update the .env with your proper credentials using JIRA variables from `config/jira-rest.php`.
45+
46+
## Usage
47+
48+
```
49+
// Fetch all issues for specified project and status.
50+
$issues = Jira::issues()->search('project=MYPROJECT and status=Open');
51+
foreach ($issues as $issue) {
52+
print $issue->key;
53+
...
54+
}
55+
56+
...
57+
58+
// Get certain project details.
59+
$project = Jira::projects()->get('MYPROJECT');
60+
print $project->name;
61+
62+
```

0 commit comments

Comments
 (0)