Download the PHP package bastinald/laravel-automatic-migrations without Composer

On this page you can find all versions of the php package bastinald/laravel-automatic-migrations. 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-automatic-migrations

Laravel Automatic Migrations

Instead of having to create and manage migration files, this package allows you to specify your migrations inside your model classes via a migration method. When you run the migrate:auto command, it uses Doctrine to compare your model migration methods to the existing schema, and applies the changes automatically.

This package works fine alongside traditional Laravel migration files, for the cases where you still need migrations that are not coupled to a model. When you run the migrate:auto command, it will run your traditional migrations first, and the automatic migrations afterwards.

Documentation

Installation

Require the package via composer:

Usage

Declare a migration method in your models:

Run the migrate:auto command:

Commands

Making Models

Make a model with a migration method included:

This command will also make a factory whose definition points to the model method. Use --force to overwrite an existing model.

Running Migrations

Run automatic migrations:

Use -f to wipe the database, -s to seed after migration, and --force to run migrations in production.

Migration Order

You can specify the order to run your model migrations by adding a public migrationOrder property to your models. This is useful for pivot tables or situations where you must create a certain table before another.

The migrate:auto command will run the automatic migrations in the order specified. If no order is declared for a model, it will default to 0. Thanks to @vincentkedison for this idea.

Publishing Stubs

Use your own model and factory stubs by publishing package files:

Update the stub_path in config/laravel-automatic-migrations.php:

Now edit the stub files inside resources/stubs/vendor/laravel-automatic-migrations. Commands will now use these stub files to make models and factories.


All versions of laravel-automatic-migrations with dependencies

PHP Build Version
Package Version
Requires doctrine/dbal Version ^2.0
laravel/framework Version ^8.0
livewire/livewire Version ^2.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 bastinald/laravel-automatic-migrations contains the following files

Loading the files please wait ....