PHPackages                             kanvas/guild - 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. kanvas/guild

ActiveProject

kanvas/guild
============

Kanvas Guild is a Customer relationship management package.

0.1.x-dev(3y ago)01.2kMITPHPPHP &gt;= 7.4

Since Jan 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bakaphp/guild)[ Packagist](https://packagist.org/packages/kanvas/guild)[ RSS](/packages/kanvas-guild/feed)WikiDiscussions 0.1 Synced 1mo ago

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

   sidebar\_position 4  Guild
=====

[](#guild)

Guild is a Customer relationship management package that allows the user to manage his leads and deals, similar to a guild that manages its members and their assignments, as well as the reports and plans related to them.

```

```

Providing methods to manage and get leads and CRM related functions.

Methods
=======

[](#methods)

Leads
-----

[](#leads)

### Create a new lead

[](#create-a-new-lead)

```
/**
 * Create a new Lead
 *
 * @param UserInterface $user
 * @param string $title
 * @param ModelsStages $pipelineStage
 * @param LeadsRotationsAgents $agent
 * @param Organizations $organization
 * @param Types $leadType
 * @param Status $leadStatus
 * @param Source $leadSource
 * @param boolean $isDuplicate
 * @param string $description
 * @return ModelsLeads
 */

    $leads = Leads::create(
        $user,
        $title,
        $modelPipelineStage,
        $leadRotationsAgent,
        $organization,
        $leadType,
        $leadStatus,
        $leadSource,
        $isDuplicate,
        $descriptions
    );
```

### Create a new Lead Attempt

[](#create-a-new-lead-attempt)

```
$data = [
    'request' => 'Request Data',
    'ip' => '123.456.789',
    'header' => 'Request Header',
    'source' => 'Source',
    'public_key' => 'Key',
    'processed' => 0,
]

/**
 * Create a new lead attempt
 *
 * @param UserInterface $user
 * @param array $data
 * @param Leads|null $lead
 * @return ModelAttempts
 */
Leads::attempt($user, $data, $lead);
```

### Update

[](#update)

```
// find a lead by id

$lead = Leads::getById(4, $user);
$lead->Title = 'new Title';
$lead->saveOrFail();
```

### Get Leads

[](#get-leads)

```
//Get all the leads
$page = 1;
$limit = 10;
$leads = Leads::getAll($user, $page, $limit);

//Get Leads by id
$leads = Leads::getById(4);

//Get leads by status
$leads = Leads::getByStatus(LeadStatus::LOSE, $user, $page, $limit);
$leads = Leads::getByStatus(LeadStatus::WIN, $user, $page, $limit);
```

Organizations
-------------

[](#organizations)

### Create

[](#create)

```
//Create a new organization by an array of data
$organization = Organization::create($data, $user);
```

### Update

[](#update-1)

```
$organization = Organization::getById(3, $user);
Organization::update($organization, $data);
```

OR

```
$organization = Organization::getById(3)->update($data);
```

### Get

[](#get)

```
//Get Organization by its id
$organization = Organization::getById(3, $user);

//Get All organization
$page = 1;
$limit = 10;
$organization = Organization::getAll($user, $page, $limit);
```

### Add Peoples to organization

[](#add-peoples-to-organization)

```
//Get the people and the organization
$people = Peoples::getById(3);
$organization = Organization::getById(3, $user);

// Add a new people to an organization
Organization::addPeople($organization, $people);
```

Or

```
$organization = Organization::getById(3);
$organization->addPeople($people);
```

### Get Peoples from an Organization

[](#get-peoples-from-an-organization)

```
$organization = Organization::getById(3);
$organization->getPeoples();
```

Peoples
-------

[](#peoples)

### Create

[](#create-1)

```
$data = [
    'name' => 'Romeo',
    'email' => 'Romeo@mail.com'
];

$people = People::create($data, $user)
```

### Update

[](#update-2)

```
$people = People::getById(1, $user);

$people->name = 'New juan';
$people->saveOrFail();
```

Or

```
$people = People::getById(1, $user)->update($data);
```

### Create Contact

[](#create-contact)

```
// @people People user data for the new contact
// @contactType
Contacts::createNewContact($people, $contactType, $value);
```

### Update Contact

[](#update-contact)

Deals
-----

[](#deals)

### Create

[](#create-2)

```
$lead = Lead::getById(1, $user);
$newDeal = Deal::create($user, $lead)
```

### Get by Lead

[](#get-by-lead)

```
$lead = Lead::getById(1, $user);
$deal = $lead->getDeal();
```

### Get

[](#get-1)

```
$deal = Deal::getById(2, $user);
```

```
$page = 1;
$limit = 10;
$deal = Deal::getAll($user, $page, $limit);
```

### Update

[](#update-3)

```
Deal::update(Deal::getById(2), $data);
```

Pipelines
---------

[](#pipelines)

### Create

[](#create-3)

```
$pipelines = Pipelines::create($name, $entity, $user);
```

### Get

[](#get-2)

```
$page = 1;
$limit = 10;
$pipelines = Pipelines::getAll($user, $page, $limit);
```

Or

```
$pipeline = Pipelines::getById($name);
```

### Update

[](#update-4)

```
$pipeline = Pipelines::getById(1);
Pipelines::update($pipeline, $name);
```

### Create Stage

[](#create-stage)

```
// $pipeline Pipeline Object
// $name string
// $hasRotting boolean
// $rottingDays int
Pipelines::createStage($pipeline, $name, $hasRotting, $rottingDays);
```

### Get Stage

[](#get-stage)

```
$pipelineStage = Pipelines::getStageById(1);
```

Or

```
$pipelineStage = Pipelines::getStagesByPipeline($pipeline);
```

### Update Stage

[](#update-stage)

```
$pipelineStage = Pipelines::getStageById(1);
Pipelines::updateStage($pipelineStage, $data)
```

Rotations
---------

[](#rotations)

### Create

[](#create-4)

```
$pipelines = Rotations::create($name, $user);
```

### Update

[](#update-5)

```
$rotation = Rotations::getById(1);
Rotations::update($rotation, $name);
```

### Get

[](#get-3)

```
$rotation = Rotations::getById(1, $user);

$rotation = Rotation::getByName($name, $user);
```

Agents
------

[](#agents)

### Add

[](#add)

```
Agents::create($rotation, $user, $receiver, $percent, $hits);
```

### Get Agents

[](#get-agents)

```
Agents::getAllAgents($rotation, $page, $limit);

Agents::getAgentsFromRotation($rotation, $page, $limit);

Agents::getAgentById(2, $user);
```

### Update Agent

[](#update-agent)

```
$agent = Rotation::getAgentById(2, $user);
Rotations::update($agent, $data);
```

### Get current agent rotation

[](#get-current-agent-rotation)

```
Rotation::getAgent($rotation);
```

Activities
----------

[](#activities)

### Create

[](#create-5)

```
$activity = Activities::create(
    $user,
    "Title",
    $startDate,
    $endDate,
    $lead,
    $activityType,
    $isComplete,
    $appId
);
```

### Create Activity Type

[](#create-activity-type)

```
$type = Activities::createType($user, $name, $description);
```

### Update

[](#update-6)

```
$activityEdited = Activities::update($activity, $data);
```

### Get

[](#get-4)

```
// Get activity by id
Activities::getById(1, $user);

// Get all activities
Activities::getAll($user, $page, $limit);

// Get leads activities
$lead = Leads::getById(1);

$lead->getActivities();
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

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

1224d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/136c850ea7ec76b23cc5b1fed8507683cc891145cffedc7761fe73ce03960df3?d=identicon)[mctekk](/maintainers/mctekk)

---

Top Contributors

[![arfenis](https://avatars.githubusercontent.com/u/23733749?v=4)](https://github.com/arfenis "arfenis (214 commits)")[![kaioken](https://avatars.githubusercontent.com/u/118385?v=4)](https://github.com/kaioken "kaioken (8 commits)")

---

Tags

guildkanvas

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kanvas-guild/health.svg)

```
[![Health](https://phpackages.com/badges/kanvas-guild/health.svg)](https://phpackages.com/packages/kanvas-guild)
```

PHPackages © 2026

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