Download the PHP package yui019/hori without Composer

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

Hori

Database schema library for Laravel inspired by Prisma.

How is this different from normal laravel migrations?

In case you've never used the NodeJS library Prisma, what it does is that it handles creating migrations for you. You have a single schema file where you write all the tables you have and migrations to add/drop tables or columns are automatically generated according to it.

So if you want to remove a column from a table, all you need to do is remove it in the schema file and run php artisan hori:generate, which automatically generates a migration that removes that column.

There's 2 advantages to this approach:

  1. It's much easier and faster for you to directly work on a single schema file than to manually create migrations for each change
  2. You don't need to look at all migrations or the database to know what tables and rows you currently have - you just look at the schema file instead

Usage

You can install Hori with the command:

After that, you run:

which will create a hori directory in the database directory with a schema.php file inside.

This is what that file looks like by default:

The $this->createDefaultLaravelTables() line creates the default laravel tables such as password_reset_tokens, cache, jobs, etc. - i.e. all tables created by the 3 migrations present by default in every laravel project, except for the users table.

That table is created in the schema.php file right above instead. The reason why I made this choice is that it's very common to want to change something about the default users table, whereas all the other ones are left as is 99% of the time, and it felt too cramped to have all those tables in there by default.

This command also deletes those 3 default migrations. You can optionally pass the --dont-delete-default-migrations option to avoid that.


Next, you run the command:

and give it a name for the migration.

This will create a migration in the database/migrations directory which will create all those tables.


Now, say you want to add a photo column to the users table. Normally, you would need to manually create an add_photo_column migration which adds the column (and drops it in the down method).

With Hori, all you do is add a line such as $table->string('photo'); to the schema file and run php artisan hori:generate again. This will automatically create a migration which does the same thing.

Features


All versions of hori with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 yui019/hori contains the following files

Loading the files please wait ....