Download the PHP package nova-horizons/realoquent without Composer

On this page you can find all versions of the php package nova-horizons/realoquent. 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 realoquent

⚠️ This is pre-beta and no longer maintained.
Realoquent: Laravel Schema and Model Generator
Less Magic, More Generated Code

Latest Version on Packagist tests static analysis code coverage

In a Laravel application, making a database-related change can be a bit complicated... Create a migration, create a model, fill out fillable/guarded, fill out casts, write validation, add relationship methods... What if it could all be done automatically?

Realoquent defines your database and model structure in a single PHP file. Make an update to this PHP schema file and run a command and it will all be done for you:

Realoquent is inspired by many of the functions of Propel ORM, like a single schema file as source of truth, and generated base model classes with user-editable model classes. Generated code is as strongly typed as possible, and uses type hints as a fallback (all generated code passes PHPStan Level 9). This provides a better experience in your IDE and static analysis tools without requiring additional plugins or packages.

Table of Contents

Example schema.php

Here's an example schema.php file for a basic Users table

Setup

After installing and configuring Realoquent, it will generate your schema.php file based off your existing database schema and Eloquent models.

See Setup documentation for details on how to get started.

Usage

To make a change to your database schema or models, update the item in your schema.php file.

Then run php artisan realoquent:diff to review the changes, generate the migration, and update your models.

For more details, see the documentation:

FAQ

How does Realoquent compare to other Laravel schema/model generators?

Realoquent is designed to have a schema file as the source of truth. It lives with your project, and is not only for initial project scaffolding or setup. It allows for changes and code generation at any point without compromising your custom logic. This package focuses only on databases and models, leaving other aspects like controllers or forms up to your teams preference. Realoquent specializes in handling the routine, repetitive tasks such as migrations and model configurations, leaving the details of logic or preferred controller/form patterns to you.

Why use a PHP file to define the schema, instead of Model properties or annotations?

Using a separate PHP file to define the schema, as opposed to Model properties or annotations, provides for several benefits:

Why generate a base model class?

Generating a base model class helps improve your code organization and promote cleaner models. The base model class contains the auto-generated code such as fillable, guarded, casts properties, validation, and PHPDocs for model properties. The main model file then stays small & tidy, containing only your custom logic. This also ensures that auto-generated code and custom code are kept separate, reducing the chance of accidental changes and making future updates simpler and less error-prone.

Why does everything in schema.php have a realoquentId?

Each item in schema.php having a realoquentId serves as a unique identifier. This unique identifier is used to track the schema changes over time. When you run the realoquent:diff command, it compares these IDs to identify which parts have been added, removed, or changed. Specifically this helps with detecting when a column/table/index is renamed, without requiring any extra work or different behavior to rename an item. This detailed tracking allows for the precise generation of migration files reflecting exactly what has been modified in your schema.

Todo

Realoquent is still in progress. Here's some of the things that need to be done:

Development Setup

If you want to contribute changes to Realoquent:

  1. Clone this repo
  2. Run composer install
  3. Run ./vendor/bin/sail up -d to start test databases
  4. Make your changes
  5. Run composer quality to run CS Fixer, Pest, and PHPStan

To include in another project, add the following to your composer.json file, then follow normal setup:


All versions of realoquent with dependencies

PHP Build Version
Package Version
Requires php Version ~8.2|~8.3|~8.4
illuminate/database Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
nette/php-generator Version ^4.1.7
nikic/php-parser Version ^5.4.0
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 nova-horizons/realoquent contains the following files

Loading the files please wait ...