PHPackages                             onwwward/laravel-bugherd - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. onwwward/laravel-bugherd

ActiveLibrary[API Development](/categories/api)

onwwward/laravel-bugherd
========================

Laravel 5 wrapper for Bugherd API

0.1.0(9y ago)11424MITPHP

Since Aug 23Pushed 6y ago2 watchersCompare

[ Source](https://github.com/onwwward/laravel-bugherd)[ Packagist](https://packagist.org/packages/onwwward/laravel-bugherd)[ RSS](/packages/onwwward-laravel-bugherd/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Laravel Bugherd
===============

[](#laravel-bugherd)

[![Build Status](https://camo.githubusercontent.com/fd73b7146a50bce248eaf695f57062beb7f4ab7b9383786f1588a1d40f719360/68747470733a2f2f7472617669732d63692e6f72672f6f6e7777776172642f6c61726176656c2d627567686572642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/onwwward/laravel-bugherd)[![StyleCI](https://camo.githubusercontent.com/b37a061a90afba9eef555a85e1e8d6222fb5b87e7c55c2468f3f2d3a40339fe7/68747470733a2f2f7374796c6563692e696f2f7265706f732f36363335373536382f736869656c64)](https://styleci.io/repos/65727693)![license](https://camo.githubusercontent.com/0e9af8b0c9af6c0dac3c993615656395679e861f8733e7305d331f90c9c4ff03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f6e7777776172642f6c61726176656c2d627567686572642e7376673f6d61784167653d32353932303030)![Packagist](https://camo.githubusercontent.com/d3396ab7598cb467a8b9660fcd1eb998feed8df74742c600812cec9f52d7e8c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6e7777776172642f6c61726176656c2d627567686572642e7376673f6d61784167653d32353932303030)

This is a Laravel 5 wrapper for the [PHP Bugherd Api](https://github.com/beleneglorion/php-bugherd-api) package.

What is Bugherd?
----------------

[](#what-is-bugherd)

[BugHerd](https://bugherd.com/about/) is a simple point and click bug tracker, that was founded in 2011 by Alan Downie and Matt Milosavljevic.

[https://www.bugherd.com/api\_v2](https://www.bugherd.com/api_v2)

Basic Installation
------------------

[](#basic-installation)

### Laravel

[](#laravel)

Add the service provider to the providers array in `config/app.php`:

```
...
Onwwward\Bugherd\BugherdServiceProvider::class,
...
```

You can optionally use the facade for shorter code. Add the facade to the alias array in `config/app.php`:

```
...
'Bugherd' => Onwwward\Bugherd\Facade\Bugherd::class,
...
```

### Lumen

[](#lumen)

Find the section in `bootstrap/app.php` where you should register the service providers and add the following:

```
...
$app->register(Onwwward\Bugherd\BugherdServiceProvider::class);
...
```

You can optionally use the facade for shorter code. However you will have to uncomment the following line in `bootstrap/app.php` file:

```
...
$app->withFacades();
...
```

You will also have to add the following to the same file:

```
...
class_alias('Onwwward\Bugherd\Facades\Bugherd', 'Bugherd');
...
```

Configuration
-------------

[](#configuration)

### Laravel

[](#laravel-1)

You'll need to provide your `apikey` which you can find under your profile settings in [Bugherd](https://bugherd.com). In [Laravel](https://laravel.com) you should be able to publish the configuration file with an `artisan` command, but you can create the file manually as well.

```
$ php artisan vendor:publish --provider="Onwwward\Bugherd\BugherdServiceProvider" --tag="config"
```

> **Where's the file?** Laravel 5 will publish the config file to `/config/bugherd.php`.

### Lumen

[](#lumen-1)

There is no command for publishing package files in [Lumen](https://lumen.laravel.com) so you'll have to create the config file manually. Create a `config` directory in the application's root in case you don't have it. Then, either copy the `bugherd.php` file from `/vendor/onwwward/laravel-bugherd/src/config/` or create the php file returning a simple array with the correct 'apikey' .

```
...
return [
  'apikey' => 'YOUR_API_KEY'
];
...
```

Code Example
------------

[](#code-example)

There are several ways to resolve something out of the container.

### with Facade

[](#with-facade)

Include the facade at the top:

```
use Onwwward/Bugherd/Facades/Bugherd;
```

Then you can use it anywhere:

```
Bugherd::api('user')->all();
```

### Type Hinting

[](#type-hinting)

```
protected $protected;

public function __construct(Bugherd/Client $bugherd)
{
   $this->bugherd = $bugherd;
}
```

### Make method (Laravel)

[](#make-method-laravel)

```
$bugherd = $this->app->make('bugherd');
$bugherd->api('user')->all();
```

### app Helper (Lumen)

[](#app-helper-lumen)

```
$bugherd = app('bugherd');
$bugherd->api('user')->all();
```

Accessing the Bugherd Resources
-------------------------------

[](#accessing-the-bugherd-resources)

```
/** Projects **/
// Get all projects
$projects = Bugherd::api('project')->all();

// Get all active projects
$active_projects = $bugherd->api('project')->allActive();

// Get all projects with name/id pairs
$projects = $bugherd->api('project')->listing($forceUpdate, $reverse);

// Get all active projects with name/id pairs
$active_projects = $bugherd->api('project')->listingActive($forceUpdate, $reverse);

// Get project id given its name
$id = $bugherd->api('project')->getIdByName($name);

// Get a project
$project = $bugherd->api('project')->show($id);

// Create a project
$project = $bugherd->api('project')->create(array(
    'name'      => 'Name of the Project',
    'devurl'    => 'http://example.com/',
    'is_active' => true,
    'is_public' => false,
));

/** Users **/
// Get all users
$users = $bugherd->api('user')->all();

// Get all guests
$guests = $bugherd->api('user')->getGuests();

// Get all members
$members = $bugherd->api('user')->getMembers();

/ Tasks **/
// Get a task
$task = $bugherd->api('task')->show($projectId, $taskId);

// Create a task
$task = $bugherd->api('task')->create($projectId, array(
    'description'      => 'Some description',
    'requester_id'     => $requester_id,
    'requester_email'  => $requester_email
));

// Update a task
$task = $bugherd->api('task')->update($projectId, $taskId, array(
    'description'      => 'Some new description',
));

// Get all tasks
$tasks = $bugherd->api('task')->all($projectId, array(
    'status' => 'backlog',
    'priority' => 'critical'
));

/** Organization **/
// Get organization information
$organization = $bugherd->api('organization')->show();

/** Comments **/
// Create a comment
$comment = $bugherd->api('comment')->create($projectId, $taskId, array(
    'text'      => 'some comment',
    'user_id'     => $user_id,
    'user_email'  => $user_email
));

// Get all comments
$comments = $bugherd->api('comment')->all($projectId, $taskId);

/** Webhooks **/
// Get all webhooks
$webhooks = $bugherd->api('webhook')->all();

// Create a webhook
$webhook = $bugherd->api('webhook')->create(array(
    'target_url' => 'http://example.com/tasks/create',
    'event' => 'task_create' // this could be task_update, task_destroy, comment
));

// Delete a webhook
$bugherd->api('webhook')->remove($webhookId);
```

### Todo

[](#todo)

- Add logging maybe?

### License

[](#license)

This plugin is released under the permissive MIT license. Your contributions are always welcome.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3598d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5774580?v=4)[Roland K](/maintainers/rolandsaven)[@rolandsaven](https://github.com/rolandsaven)

![](https://avatars.githubusercontent.com/u/13520349?v=4)[Onwwward](/maintainers/onwwward)[@onwwward](https://github.com/onwwward)

---

Top Contributors

[![rolandsaven](https://avatars.githubusercontent.com/u/5774580?v=4)](https://github.com/rolandsaven "rolandsaven (8 commits)")

---

Tags

laravellumenbug-trackingbugherd

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/onwwward-laravel-bugherd/health.svg)

```
[![Health](https://phpackages.com/badges/onwwward-laravel-bugherd/health.svg)](https://phpackages.com/packages/onwwward-laravel-bugherd)
```

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3634.4M33](/packages/mollie-laravel-mollie)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

99620.0k3](/packages/vluzrmos-slack-api)[riclep/laravel-storyblok

A Laravel wrapper around the Storyblok API to provide a familiar experience for Laravel devs

6277.0k5](/packages/riclep-laravel-storyblok)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
