PHPackages                             wakebit/laravel-cycle - 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. wakebit/laravel-cycle

ActiveLibrary

wakebit/laravel-cycle
=====================

Cycle ORM integration with Laravel

v2.1.1(2y ago)4580MITPHPPHP ^8.0|^8.1|^8.2

Since Mar 31Pushed 2y ago2 watchersCompare

[ Source](https://github.com/wakebit/laravel-cycle)[ Packagist](https://packagist.org/packages/wakebit/laravel-cycle)[ RSS](/packages/wakebit-laravel-cycle/feed)WikiDiscussions v2.x Synced today

READMEChangelog (6)Dependencies (9)Versions (8)Used By (0)

Cycle ORM integration with Laravel
==================================

[](#cycle-orm-integration-with-laravel)

This package provides an integration [Cycle ORM](https://cycle-orm.dev) with Laravel. We are supporting integration both versions of the ORM. Internally, it uses [the bridge](https://github.com/wakebit/cycle-bridge) package that can be used with almost any framework.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0
- Laravel 7, 8, 9

The package uses Cycle ORM 1 or 2 (branches `v1.x` and `v2.x` accordingly).

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

[](#installation)

1. Install the package via composer:

```
composer require wakebit/laravel-cycle
```

2. Publish the config `cycle.php`:

```
php artisan vendor:publish --provider="Wakebit\LaravelCycle\ServiceProvider" --tag=config
```

Usage
-----

[](#usage)

1. Configure database connection in the `database` config section. You don't need to make any changes if you are already using any of Laravel-compatible database driver. It uses same `DB_*` environment variables. The contents of the key should return a `\Cycle\Database\Config\DatabaseConfig` instance. See more [here](https://cycle-orm.dev/docs/database-connect/2.x/en).
2. Configure paths where your entities located in `tokenizer` section. By default, class locator looks them in app folder.

Define entity:

```
