PHPackages                             urbics/laracivi - 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. urbics/laracivi

ActiveLibrary[API Development](/categories/api)

urbics/laracivi
===============

Brings CiviCRM to Laravel projects.

1.0.1(8y ago)46MITPHPPHP ^5.6.4 || ^7.0

Since Dec 27Pushed 8y ago1 watchersCompare

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

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

Laracivi - a Laravel 5.5 to CiviCRM bridge
==========================================

[](#laracivi---a-laravel-55-to-civicrm-bridge)

Installs CiviCRM as a package within a laravel project.

Provides civicrm\_api3 access to an existing or a new CiviCRM database using a thin api wrapper. Includes console commands to build migrations for all CiviCRM tables from CiviCRM's schema.xml source and seeders from civicrm\_data.mysql and civicrm\_acl.mysql source, as well as Entity model classes for all CiviCRM tables. Also includes console commands to generate a CiviCRM database directly from civicrm.mysql, and to backup and restore a CiviCRM database. The package uses a lightly modified fork of civicrm-core and unmodified civicrm/civrm-packages.

Package Installation
--------------------

[](#package-installation)

```
composer require urbics/laracivi
```

Or manually by modifying `composer.json` file:

```
"require": {
    "urbics/laracivi": "~1.*"
}
```

Next, add package repository sources to the root composer.json in your project (these components are not currently on packagist):

```
"repositories": [
    {
      "type": "git",
      "url": "https://github.com/urbics/civicrm-core.git"
    },
    {
      "type": "git",
      "url": "https://github.com/civicrm/zetacomponents-mail.git"
    },
    {
      "type": "git",
      "url": "https://github.com/totten/topsort.php.git"
    },
    {
       "type": "package",
        "package": {
            "name": "civicrm/civicrm-packages",
            "version": "master",
            "source": {
                "url": "https://github.com/civicrm/civicrm-packages",
                "type": "git",
                "reference": "master"
            }
        }
    }
],
```

A few of the civicrm-core dependencies (and the urbics fork of civicrm/civicrm-core) have a dev status, so allow dev packages:

```
"prefer-stable": true,
"minimum-stability": "dev",
```

Finally, run `composer install`

CiviCRM Installation
--------------------

[](#civicrm-installation)

From your project directory, run

`php artisan civi:install`

(If you are using homestead or another virtual machine, ssh into the virtual machine before running this)

which will:

- Add a civicrm.settings.php file to `vendor/civicrm/civicrm-core/src`
- Move civicrm-packages to `vendor/civicrm/civicrm-core/packages`
- Generate civicrm.mysql and related files in `vendor/civicrm/civicrm-core/sql` from `vendor/civicrm/civicrm-core/xml/schema/Schema.xml` source
- Add several `CIVI_XXX` settings to the bottom of your project's .env file

then run `php artisan vendor:publish`to bring a civi.php settings file into the config folder.

Next Steps
----------

[](#next-steps)

- Run civi:make:db to create a new civicrm database directly, using CiviCRM's civicrm.msql script.
- Or, run civi:make:migration to generate migration files, optionally with seeder and model classes.
- Build the tables using Laravel's migration: `php artisan migrate --database=civicrm --path=database/migrations/civi --seed` (These are the default settings - change database connection and path as needed)

Limitations and cautions
------------------------

[](#limitations-and-cautions)

The civicrm/civicrm-core package has dependencies whose versions may conflict with those in your project. urbics/laracivi has been tested against a clean install of laravel 5.5; more complex projects have had conflicts during `composer install`.

civicrm-core uses the PEAR DB class, which conflicts with the DB facade used in Laravel. A solution is to replace `use DB;` with `use Illuminate\Database\DatabaseManager as DB;` in classes that rely on the DB facade.

Tests
-----

[](#tests)

The project includes phpunit tests for each of the console commands as well as for basic api functionality.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~0 days

Total

2

Last Release

3106d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29735946?v=4)[Urbics](/maintainers/urbics)[@urbics](https://github.com/urbics)

---

Top Contributors

[![Dmealy](https://avatars.githubusercontent.com/u/674078?v=4)](https://github.com/Dmealy "Dmealy (6 commits)")

### Embed Badge

![Health badge](/badges/urbics-laracivi/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)[civicrm/civicrm-drupal-8

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

19246.3k2](/packages/civicrm-civicrm-drupal-8)[project60/org.project60.banking

Automatic and semi-automatic processing of bank statements and other payment files.

221.4k2](/packages/project60-orgproject60banking)

PHPackages © 2026

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