PHPackages                             blitheness/laravel-deputy - 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. blitheness/laravel-deputy

AbandonedArchivedLibrary[API Development](/categories/api)

blitheness/laravel-deputy
=========================

Laravel package for interacting with the Deputy API

0.2.1(7y ago)039MITPHP

Since Jul 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Blitheness/laravel-deputy)[ Packagist](https://packagist.org/packages/blitheness/laravel-deputy)[ Docs](https://github.com/Blitheness/laravel-deputy)[ RSS](/packages/blitheness-laravel-deputy/feed)WikiDiscussions master Synced yesterday

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

This project has been archived, and no further support will be provided. Anyone is welcome to fork the project to continue development.

laravel-deputy
==============

[](#laravel-deputy)

Laravel package for interacting with the Deputy API. Deputy is a powerful business management system, available from .

This package is provided AS-IS, with no guarantee of functionality or support. This package is not meant to work for every use case. More information may be found in this repository's LICENSE file.

Some basic instructions are provided below.

Installation
------------

[](#installation)

`composer require blitheness/laravel-deputy dev-master`

`php artisan vendor:publish` *(then enter number for Blitheness\\Deputy\\DeputyServiceProvider)*

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

[](#configuration)

Either update **config/deputy.php** to change the 'url' and 'token' values, or set 'DEPUTY\_URL' and 'DEPUTY\_TOKEN' values in your .env file.

The URL is the Deputy subdomain that your company is using, such as "mycompany.eu.deputy.com", without any "http://", "https://", or any trailing slashes.

The token is your Deputy API 'Permanent Token', which may be created by a System Administrator in your organisation. An authorised user may generate a token by following the instructions in the Deputy API documentation:

Usage
-----

[](#usage)

### Resources

[](#resources)

- Company
- Employee
- EmployeeAgreement
- EmployeeContract
- EmployeeWorkplace
- OperationalUnit
- User (read-only)

### Facades

[](#facades)

To make use of a Deputy 'resource', use a real-time Facade.

Add this to the top of your controller `use Facades\Blitheness\Deputy\Models\RESOURCE_NAME;` where RESOURCE\_NAME is a resource from the list above.

### Retrieving Data

[](#retrieving-data)

#### Known ID

[](#known-id)

`$result = Resource::find(ID)`

Where **Resource** is a resource from the list above, and **ID** is the ID of the resource in Deputy that you are attempting to find.

#### Searching

[](#searching)

To search, use the 'search' method on that resource's real-time facade:

`$results = Resource::search('FieldName', 'eq', 'Value')->get();`

More than one condition may be used per query by chaining the search calls together, such as:

`$results = Resource::search('FieldName', 'eq', 'Value')->search('Active', 'eq', '1')->get();`

### Updating Resources

[](#updating-resources)

#### Model attributes

[](#model-attributes)

To update a resource, it must not be a read-only resource.

First, retrieve the resource you wish to modify, for example:

`$resource = Employee::find(123);`

Secondly, change the desired attribute(s) on the model:

`$resource->FirstName = "New First Name";`

Finally, call the save method on the model:

`$resource->save()`

#### Background tasks (Jobs)

[](#background-tasks-jobs)

##### Remove employee from location

[](#remove-employee-from-location)

To disassociate an employee from a location, you must know the employee's ID and the ID of the location.

Then, one of the following jobs may be dispatched:

`Blitheness\Deputy\Jobs\DisassociateEmployee`

Firstly, include this in the controller file before your class declaration:

`use Blitheness\Deputy\Jobs\DisassociateEmployee;`

Then, write the following where you would like to dispatch the job:

`DisassociateEmployee::dispatch($deputyId, $locationId);`

where deputyId is the Employee ID, and locationId is the ID of the location that they are to be removed from.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

2869d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d58fb85eca5536dc7eb902551c924f88dc38a5d293f1f7b9f135ac73cc671f98?d=identicon)[AndyPo](/maintainers/AndyPo)

---

Top Contributors

[![Blitheness](https://avatars.githubusercontent.com/u/19779808?v=4)](https://github.com/Blitheness "Blitheness (49 commits)")

---

Tags

deputyblitheness

### Embed Badge

![Health badge](/badges/blitheness-laravel-deputy/health.svg)

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

###  Alternatives

[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)

PHPackages © 2026

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