PHPackages                             djam90/laravel-harvest - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. djam90/laravel-harvest

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

djam90/laravel-harvest
======================

0.0.19(7y ago)71043[1 PRs](https://github.com/djam90/laravel-harvest/pulls)PHP

Since Jul 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/djam90/laravel-harvest)[ Packagist](https://packagist.org/packages/djam90/laravel-harvest)[ RSS](/packages/djam90-laravel-harvest/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (4)Versions (20)Used By (0)

laravel-harvest
===============

[](#laravel-harvest)

A Laravel wrapper around the Harvest time-tracking API
------------------------------------------------------

[](#a-laravel-wrapper-around-the-harvest-time-tracking-api)

### General Info

[](#general-info)

- Requires Laravel 5.4 or above
- Only supports Harvest API v2

### Installation Instructions

[](#installation-instructions)

Simply run in your terminal `composer require djam90/laravel-harvest`

The package should automatically register the service provider.

You may need to publish the vendor config file by running `php artisan vendor:publish`

### Usage

[](#usage)

Add the following to your .env file:

*Please note that the Harvest details must be from an Admin user*

```
HARVEST_ACCOUNT_ID=[YOUR_ACCOUNT_ID]
HARVEST_PERSONAL_ACCESS_TOKEN=[YOUR_ACCESS_TOKEN]
```

Import the HarvestService class into your constructor or controller methods:

```
use Djam90\Harvest\HarvestService;

public function __construct(HarvestService $harvestService)
{
    $this->harvestService = $harvestService;
}
```

Then you can use it in your methods:

```
public function foo()
{
    $user = $this->harvestService->user->getCurrentUser();
}
```

You can alternatively use the Harvest facade:

```
use Harvest;

public function foo()
{
    // notice the user() is a method when using the Facade
    Harvest::user()->getCurrentUser();
}
```

### Available Services

[](#available-services)

The following services can be accessed either using the harvest service or the facade:

```
clientContact
client
company
estimateItemCategory
estimateMessage
estimate
expenseCategory
expense
invoiceItemCategory
invoiceMessage
invoicePayment
invoice
project
projectTaskAssignment
projectUserAssignment
role
task
timeEntry
userProjectAssignment
user

```

#### Example

[](#example)

The general syntax is as follows:

`$this->harvestService->SERVICE->METHOD()`

See below for examples:

```
$company = $this->harvestService->company->get();
$users = $this->harvestService->user->get();

$company = Harvest::company()->get();
$users = Harvest::user()->get();
```

### Service Methods

[](#service-methods)

Below is a list of available methods you can call for each service.

#### clientContact

[](#clientcontact)

```
get($clientId = null, $updatedSince = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($contactId)
create($clientId, $firstName, $lastName = null, $title = null, $email = null, $phoneOffice = null, $phoneMobile = null, $fax = null)
update(contactId, $clientId, $firstName = null, $lastName = null, $title = null, $email = null, $phoneOffice = null, $phoneMobile = null, $fax = null)
delete($contactId)
```

#### client

[](#client)

```
get($isActive = null, $updatedSince = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($clientId)
create($name, $isActive = null, $address = null, $currency = null)
update($clientId, $name = null, $isActive = null, $address = null, $currency = null)
delete($clientId)
```

#### company

[](#company)

```
get()
```

#### estimateItemCategory

[](#estimateitemcategory)

```
get($updatedSince = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($estimateItemCategoryId)
create($name)
update($name)
delete($estimateItemCategoryId)
```

#### estimateMessage

[](#estimatemessage)

```
get($estimateId, $updatedSince = null, $page = null, $perPage = null)
getPage($estimateId = null, $page, $perPage = null)
getAll()
create($estimateId, array $recipients, $subject = null, $body = null, $sendMeACopy = null, $eventType = null)
delete($estimateId, $messageId)
markDraftEstimateAsSent($estimateId)
markOpenEstimateAsAccepted($estimateId)
markOpenEstimateAsDeclined($estimateId)
reopenClosedEstimate($estimateId)
updateEstimateMessage($estimateId, $eventType)
```

#### estimate

[](#estimate)

```
get($clientId = null, $updatedSince = null, $from = null, $to = null, $state = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($estimateId)
create($clientId, $number = null, $purchaseOrder = null, $tax = null, $tax2 = null, $discount = null, $subject = null, $notes = null, $currency = null, $issueDate = null, $lineItems = null)
update($estimateId, $clientId = null, $number = null, $purchaseOrder = null, $tax = null, $tax2 = null, $discount = null, $subject = null, $notes = null, $currency = null, $issueDate = null, $lineItems = null)
createLineItem($estimateId, $kind, $unitPrice, $description = null, $quantity = null, $taxed = null, $taxed2 = null)
updateLineItem($estimateId, $lineItemId, $kind = null, $description = null, $quantity = null, $unitPrice = null, $taxed = null, $taxed2 = null)
deleteLineItem($estimateId, $lineItemId)
delete($estimateId)
```

#### expenseCategory

[](#expensecategory)

```
get($isActive = null, $updatedSince = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($expenseCategoryId)
create($name, $unitName = null, $unitPrice = null, $isActive = null)
update($expenseCategoryId, $name = null, $unitName = null, $unitPrice = null, $isActive = null)
delete($expenseCategoryId)
```

#### expense

[](#expense)

```
get($userId = null, $clientId = null, $projectId = null, $isBilled = null, $updatedSince = null, $from = null, $to = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($expenseId)
create($projectId, $expenseCategoryId, $spentDate, $userId = null, $units = null, $totalCost = null, $notes = null, $billable = null, $receipt = null)
update($expenseId, $projectId = null, $expenseCategoryId = null, $spentDate = null, $userId = null, $units = null, $totalCost = null, $notes = null, $billable = null, $receipt = null, $deleteReceipt = null)
delete($expenseId)
```

#### invoiceItemCategory

[](#invoiceitemcategory)

```
get($updatedSince = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($invoiceItemCategoryId)
create($name)
update($name)
delete($invoiceItemCategoryId)
```

#### invoiceMessage

[](#invoicemessage)

```
get($invoiceId, $updatedSince = null, $page = null, $perPage = null)
getPage($invoiceId, $page, $perPage = null)
getAll($invoiceId)
create($invoiceId, $recipients, $subject = null, $body = null, $includeLinkToClientInvoice = null, $attachPdf = null, $sendMeACopy = null, $thankYou = null, $eventType = null)
delete($invoiceId, $messageId)
markDraftInvoiceAsSent($invoiceId)
markOpenInvoiceAsClosed($invoiceId)
reopenClosedInvoice($invoiceId)
markOpenInvoiceAsDraft($invoiceId)
```

#### invoicePayment

[](#invoicepayment)

```
get($invoiceId, $updatedSince = null, $page = null,$perPage = null)
getPage($invoiceId, $page, $perPage = null)
getAll($invoiceId)
create($invoiceId, $amount, $paidAt = null, $notes = null)
delete($invoiceId, $paymentId)
```

#### invoice

[](#invoice)

```
get($clientId = null, $projectId = null, $updatedSince = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($invoiceId)
create($clientId, $retainerId = null, $estimateId = null, $number = null, $purchaseOrder = null, $tax = null, $tax2 = null, $discount = null, $subject = null, $notes = null, $currency = null, $issueDate = null, $dueDate = null, $lineItems = null)
update($invoiceId, $clientId, $retainerId = null, $estimateId = null, $number = null, $purchaseOrder = null, $tax = null, $tax2 = null, $discount = null, $subject = null, $notes = null, $currency = null, $issueDate = null, $dueDate = null, $lineItems = null)
createLineItem($invoiceId, $kind, $unitPrice, $projectId = null, $description = null, $quantity = null, $taxed = null, $taxed2 = null)
updateLineItem($invoiceId, $lineItemId, $kind = null, $unitPrice = null, $projectId = null, $description = null, $quantity = null, $taxed = null, $taxed2 = null)
deleteLineItem($invoiceId, $lineItemId)
delete($invoiceId)
```

#### project

[](#project)

```
get($isActive = null, $clientId = null, $updatedSince = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($projectId)
create($clientId, $name, $isBillable, $billBy, $budgetBy, $code = null, $isActive = null, $isFixedFee = null, $hourlyRate = null, $budget = null, $notifyWhenOverBudget = null, $overBudgetNotificationPercentage = null, $showBudgetToAll = null, $costBudget = null, $costBudgetIncludeExpenses = null, $fee = null, $notes = null, $startsOn = null, $endsOn = null)
update($projectId, $clientId = null, $name = null, $isBillable = null, $billBy = null, $budgetBy = null, $code = null, $isActive = null, $isFixedFee = null, $hourlyRate = null, $budget = null, $notifyWhenOverBudget = null, $overBudgetNotificationPercentage = null, $showBudgetToAll = null, $costBudget = null, $costBudgetIncludeExpenses = null, $fee = null, $notes = null, $startsOn = null, $endsOn = null)
delete($projectId)
```

#### projectTaskAssignment

[](#projecttaskassignment)

```
get($projectId, $isActive = null, $updatedSince = null, $page = null, $perPage = null)
getPage($projectId, $page, $perPage = null)
getAll($projectId)
getById($projectId, $taskAssignmentId)
create($projectId, $taskId, $isActive = null, $billable = null, $hourlyRate = null, $budget = null)
update($projectId, $taskAssignmentId, $isActive = null, $billable = null, $hourlyRate = null, $budget = null)
delete($projectId, $taskAssignmentId)
```

#### projectUserAssignment

[](#projectuserassignment)

```
get($projectId, $isActive = null, $updatedSince = null, $page = null, $perPage = null)
getPage($projectId, $page, $perPage = null)
getAll($projectId)
getById($projectId, $userAssignmentId)
create($projectId, $userId, $isActive = null, $isProjectManager = null, $hourlyRate = null, $budget = null)
update($projectId, $userAssignmentId, $isActive = null, $isProjectManager = null, $hourlyRate = null, $budget = null)
delete($projectId, $userAssignmentId)
```

#### role

[](#role)

```
get($page = null, $perPage = null)
getPage($page, $perPage = null)
getById($roleId)
create($name, $userIds = null)
update($roleId, $name, $userIds = null)
delete($roleId)
```

#### task

[](#task)

```
get($isActive = null, $updatedSince = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getById($taskId)
create($name, $billableByDefault = null, $defaultHourlyRate = null, $isDefault = null, $isActive = null)
update($taskId, $name = null, $billableByDefault = null, $defaultHourlyRate = null, $isDefault = null, $isActive = null)
delete($taskId)
```

#### timeEntry

[](#timeentry)

```
get($userId, $clientId, $projectId, $isBilled = null, $isRunning = null, $updatedSince = null, $from = null, $to = null, $page = null, $perPage = null)
getPage($userId = null, $clientId = null, $projectId = null, $page, $perPage = null)
getAll($userId = null, $clientId = null, $projectId = null)
getById($timeEntryId)
createForDuration($projectId, $taskId, $spentDate, $userId = null, $hours = null, $notes = null, $externalReference = null)
createForStartAndEndTime($projectId, $taskId, $spentDate, $userId = null, $startedTime = null, $endedTime = null, $notes = null, $externalReference = null)
update($timeEntryId, $projectId = null, $taskId = null, $spentDate = null, $startedTime = null, $endedTime = null, $hours = null, $notes = null, $externalReference = null)
delete($timeEntryId)
restart($timeEntryId)
stop($timeEntryId)
```

#### userProjectAssignment

[](#userprojectassignment)

```
get($userId, $updatedSince = null, $page = null, $perPage = null)
getPage($userId = null, $page, $perPage = null)
getAll($userId)
getForCurrentUser($page = null, $perPage = null)
```

#### user

[](#user)

```
get($isActive = null, $updatedSince = null, $page = null, $perPage = null)
getPage($page, $perPage = null)
getCurrentUser()
getById($userId)
create($firstName, $lastName, $email, $telephone = null, $timezone = null, $hasAccessToAllFutureProjects = null, $isContractor = null, $isAdmin = null, $isProjectManager = null, $canSeeRates = null, $canCreateProjects = null, $canCreateInvoices = null, $isActive = null, $weeklyCapacity = null, $defaultHourlyRate = null, $costRate = null, $roles = null)
update($userId, $firstName = null, $lastName = null, $email = null, $telephone = null, $timezone = null, $hasAccessToAllFutureProjects = null, $isContractor = null, $isAdmin = null, $isProjectManager = null, $canSeeRates = null, $canCreateProjects = null, $canCreateInvoices = null, $isActive = null, $weeklyCapacity = null, $defaultHourlyRate = null, $costRate = null, $roles = null)
delete($userId)
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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

Every ~6 days

Recently: every ~22 days

Total

19

Last Release

2799d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/979271?v=4)[Daniel Twigg](/maintainers/djam90)[@djam90](https://github.com/djam90)

---

Top Contributors

[![djam90](https://avatars.githubusercontent.com/u/979271?v=4)](https://github.com/djam90 "djam90 (27 commits)")[![RandomWeasel](https://avatars.githubusercontent.com/u/16453825?v=4)](https://github.com/RandomWeasel "RandomWeasel (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/djam90-laravel-harvest/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)[roundcube/roundcubemail

The Roundcube Webmail suite

7.0k1.4k3](/packages/roundcube-roundcubemail)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[nfse-nacional/nfse-php

This is my package nfse

1533.1k](/packages/nfse-nacional-nfse-php)

PHPackages © 2026

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