Download the PHP package wakebit/laravel-cycle without Composer

On this page you can find all versions of the php package wakebit/laravel-cycle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-cycle

Cycle ORM integration with Laravel

This package provides an integration Cycle ORM with Laravel. We are supporting integration both versions of the ORM. Internally, it uses the bridge package that can be used with almost any framework.

Requirements

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

Installation

  1. Install the package via composer:

  2. Publish the config cycle.php:

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.
  2. Configure paths where your entities located in tokenizer section. By default, class locator looks them in app folder.

Define entity:

You can take DBAL, ORM and Entity Manager from the container. Quick example of usage:

See more on the official Cycle ORM documentation.

Working with ORM schema

Schema can be compiled and stored in the cache (recommended for production usage). You can specify the caching driver in cycle.orm.schema config key:

Commands

Command Description Options
php artisan cycle:schema:migrate Generate ORM schema migrations - --run: Automatically run generated migration.
- -v: Verbose output.
php artisan cycle:schema:cache Compile and cache ORM schema
php artisan cycle:schema:clear Clear cached schema (schema will be generated every request now)
php artisan cycle:schema:sync Sync ORM schema with database without intermediate migration (risk operation!)
php artisan cycle:schema:render Render available Cycle ORM schemas - --no-color: Display output without colors.

Database migrations

You can specify the name of migrations table, the path where migrations will be created in cycle.migrations config key.

Commands

Command Description Options
php artisan cycle:migrate:init Initialize migrator: create a table for migrations
php artisan cycle:migrate Run all outstanding migrations - --one: Execute only one (first) migration.
- --force: Force the operation to run when in production.
php artisan cycle:migrate:rollback Rollback the last migration - --all: Rollback all executed migrations.
- --force: Force the operation to run when in production.
php artisan cycle:migrate:replay Replay (down, up) one or multiple migrations. - --all: Replay all migrations.
php artisan cycle:migrate:status Get a list of available migrations

Database commands

Command Description Options
php artisan cycle:db:list Get list of available databases, their tables and records count - --database: Database name
php artisan cycle:db:table <table> Describe table schema of specific database - --database: Database name

Writing tests

If you are using memory database (SQLite) you can just run migrations in the setUp method of the your test:

For another databases follow this instruction and drop all tables in the tearDown method.

Advanced

Manually defined ORM schema

If you want to use a manually defined ORM schema you can define it in the cycle.orm.schema SchemaConfig's map config key (this key is not present by default):

Manually defined schema should be presented as array. It will be passed to \Cycle\ORM\Schema constructor. See more here.

Custom schema compilation pipeline

You can redefine the ORM schema compilation generators in the cycle.orm.schema SchemaConfig's generators config key (this key is not present by default):

Classes will be resolved by DI container. Default pipeline you can see here in the bridge package.

Using custom collection

By default, ORM uses arrays for collection of items. If you want to use Laravel collections instead of or some another collection you can add the following key to config to orm section:

The factory class will be resolved by container. It should implement the \Cycle\ORM\Collection\CollectionFactoryInterface interface.

Notes

Credits


All versions of laravel-cycle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2
illuminate/console Version ^7.0|^8.0|^9.0|^10.0
illuminate/contracts Version ^7.0|^8.0|^9.0|^10.0
illuminate/support Version ^7.0|^8.0|^9.0|^10.0
wakebit/cycle-bridge Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wakebit/laravel-cycle contains the following files

Loading the files please wait ....