-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP * WIP * WIP
- Loading branch information
Showing
7 changed files
with
150 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Bug Report | ||
description: Report an Issue or Bug with the Package | ||
title: "[Bug]: " | ||
labels: ["bug"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
We're sorry to hear you have a problem. Can you help us solve it by providing the following details. | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: What happened? | ||
description: What did you expect to happen? | ||
placeholder: I cannot currently do X thing because when I do, it breaks X thing. | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
id: package-version | ||
attributes: | ||
label: Package Version | ||
description: What version of our Package are you running? Please be as specific as possible | ||
placeholder: 2.0.0 | ||
validations: | ||
required: true | ||
- type: input | ||
id: php-version | ||
attributes: | ||
label: PHP Version | ||
description: What version of PHP are you running? Please be as specific as possible | ||
placeholder: 8.2.0 | ||
validations: | ||
required: true | ||
- type: input | ||
id: laravel-version | ||
attributes: | ||
label: Laravel Version | ||
description: What version of Laravel are you running? Please be as specific as possible | ||
placeholder: 9.0.0 | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: operating-systems | ||
attributes: | ||
label: Which operating systems does with happen with? | ||
description: You may select more than one. | ||
multiple: true | ||
options: | ||
- macOS | ||
- Windows | ||
- Linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Ask a question | ||
url: https://github.com/codebar-ag/laravel-zammad/issues/new | ||
about: Ask the community for help | ||
- name: Request a feature | ||
url: https://github.com/codebar-ag/laravel-zammad/issues/new | ||
about: Share ideas for new features | ||
- name: Report a bug | ||
url: https://github.com/codebar-ag/laravel-zammad/issues/new | ||
about: Report a reproducable bug | ||
- name: Questions & Feature Requests | ||
url: https://github.com/codebar-ag/laravel-zammad/issues/new | ||
about: Ask the community for help | ||
- name: Report a security issue | ||
url: https://github.com/codebar-ag/laravel-zammad/security/policy | ||
about: Learn how to notify us for sensitive bugs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
.php_cs.cache | ||
.php-cs-fixer.cache | ||
.phpunit.result.cache | ||
.phpunit.cache | ||
.DS_STORE | ||
build | ||
composer.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ See the documentation if you need further functionality. ⚠️ | |
|
||
## 💡 What is Zammad? | ||
|
||
Zammad is a web based open source helpdesk/customer support system with many | ||
Zammad is a web-based open source helpdesk/customer support system with many | ||
features to manage customer communication. | ||
|
||
## 🛠 Requirements | ||
|
@@ -65,65 +65,91 @@ can create your token. Be sure to activate all rights you need. | |
|
||
```php | ||
use CodebarAg\Zammad\Facades\Zammad; | ||
``` | ||
|
||
```php | ||
/** | ||
* Get the current authenticated user. | ||
*/ | ||
|
||
$user = Zammad::user()->me(); | ||
``` | ||
|
||
```php | ||
/** | ||
* Show a list of users. | ||
*/ | ||
|
||
$users = Zammad::user()->list(); | ||
``` | ||
|
||
```php | ||
/** | ||
* Search a single user. | ||
*/ | ||
|
||
$term = 'email:[email protected]'; | ||
|
||
$user = Zammad::user()->search($term); | ||
``` | ||
|
||
```php | ||
/** | ||
* Show a user by id. | ||
*/ | ||
|
||
$user = Zammad::user()->show(20); | ||
``` | ||
|
||
```php | ||
/** | ||
* Create a new user. | ||
*/ | ||
|
||
$data = [ | ||
'firstname' => 'Max', | ||
'lastname' => 'Mustermann', | ||
'email' => '[email protected]', | ||
]; | ||
|
||
$user = (new Zammad())->user()->create($data); | ||
``` | ||
|
||
```php | ||
/** | ||
* Update a existing user. | ||
*/ | ||
|
||
$data = [ | ||
'firstname' => 'Max', | ||
'lastname' => 'Mustermann', | ||
]; | ||
|
||
$user = (new Zammad())->user()->update($id, $data); | ||
``` | ||
|
||
```php | ||
/** | ||
* Delete a user by id. | ||
*/ | ||
|
||
(new Zammad())->user()->delete(20); | ||
``` | ||
|
||
```php | ||
/** | ||
* Search a user by email. If not found create a new user. | ||
*/ | ||
|
||
$user = (new Zammad())->user()->searchOrCreateByEmail('[email protected]'); | ||
``` | ||
|
||
```php | ||
/** | ||
* Search a user by email. If not found create a new user with custom $data | ||
*/ | ||
|
||
$data = [ | ||
$data = [ | ||
'firstname' => 'Max', | ||
'lastname' => 'Mustermann', | ||
'email' => '[email protected]', | ||
|
@@ -136,32 +162,47 @@ $user = (new Zammad())->user()->searchOrCreateByEmail('[email protected] | |
|
||
```php | ||
use CodebarAg\Zammad\Facades\Zammad; | ||
``` | ||
|
||
```php | ||
/** | ||
* Show a list of tickets. | ||
*/ | ||
|
||
$tickets = Zammad::ticket()->list(); | ||
``` | ||
|
||
```php | ||
/** | ||
* Search tickets which include following term. | ||
*/ | ||
|
||
$term = 'Max Mustermann'; | ||
|
||
$tickets = Zammad::ticket()->search($term); | ||
``` | ||
|
||
```php | ||
/** | ||
* Show a ticket by id (empty comments). | ||
*/ | ||
|
||
$ticket = Zammad::ticket()->show(20); | ||
``` | ||
|
||
```php | ||
/** | ||
* Show a ticket by id with comments. | ||
*/ | ||
|
||
$ticket = Zammad::ticket()->showWithComments(20); | ||
``` | ||
|
||
```php | ||
/** | ||
* Create a new ticket. | ||
*/ | ||
|
||
$data = [ | ||
'title' => 'The application is not working', | ||
'group' => 'Inbox', | ||
|
@@ -180,31 +221,43 @@ $data = [ | |
]; | ||
|
||
$ticket = (new Zammad())->ticket()->create($data); | ||
``` | ||
|
||
```php | ||
/** | ||
* Delete a ticket by id. | ||
*/ | ||
|
||
(new Zammad())->user()->delete(20); | ||
``` | ||
|
||
### 💬 Comment Resource | ||
|
||
```php | ||
use CodebarAg\Zammad\Facades\Zammad; | ||
``` | ||
|
||
```php | ||
/** | ||
* Show comments by ticket id | ||
*/ | ||
|
||
$comments = Zammad::comment()->showByTicket(20); | ||
``` | ||
|
||
```php | ||
/** | ||
* Show a comment by id. | ||
*/ | ||
|
||
$comment = Zammad::comment()->show(20); | ||
``` | ||
|
||
```php | ||
/** | ||
* Create a new comment. | ||
*/ | ||
|
||
$data = [ | ||
'ticket_id' => 42, | ||
'subject' => 'Login still not working', | ||
|
@@ -220,23 +273,31 @@ $data = [ | |
]; | ||
|
||
$comment = (new Zammad())->comment()->create($data); | ||
``` | ||
|
||
```php | ||
/** | ||
* Delete a comment by id. | ||
*/ | ||
|
||
(new Zammad())->comment()->delete(20); | ||
``` | ||
|
||
### 🏠 Object Resource | ||
|
||
```php | ||
use CodebarAg\Zammad\Facades\Zammad; | ||
``` | ||
|
||
```php | ||
/** | ||
* Show a list of objects. | ||
*/ | ||
|
||
$objects = Zammad::object()->list(); | ||
``` | ||
|
||
```php | ||
/** | ||
* Create a object | ||
*/ | ||
|
@@ -259,30 +320,39 @@ $objects = Zammad::object()->list(); | |
]; | ||
|
||
$object = Zammad::object()->create($data); | ||
``` | ||
|
||
```php | ||
/** | ||
* Update a object | ||
*/ | ||
|
||
|
||
$object = Zammad::object()->update($id, $data); | ||
``` | ||
|
||
```php | ||
/** | ||
* Show a object by id. | ||
*/ | ||
|
||
$object = Zammad::object()->show(20); | ||
``` | ||
|
||
```php | ||
/** | ||
* Execute database migrations | ||
*/ | ||
|
||
(new Zammad())->object()->executeMigrations(); | ||
``` | ||
|
||
### 🧷 Attachment Resource | ||
|
||
```php | ||
use CodebarAg\Zammad\Facades\Zammad; | ||
``` | ||
|
||
```php | ||
/** | ||
* Download attachment. | ||
*/ | ||
|
Oops, something went wrong.