rashedraju/minivel

There is no license information available for the latest version (v1.0.4) of this package.

v1.0.4 2021-10-05 11:07 UTC

This package is auto-updated.

Last update: 2024-05-05 16:28:09 UTC


README

PHP MVC Framework

# Installation Via Composer

If your computer already has PHP and Composer installed, you may create a new Minivel project by using Composer directly. After the application has been created, you may start local development server using PHP Built-in web server.

composer create-project rashedraju/minivel my-app
cd my-app
php -S localhost:8080 -t public

# Environment Configuration

The root directory of your application will contain a .env.example file that defines many common environment variables. Create a .env file to your application root directory and add your database connection information as well as various other core configuration.

# Migrations

Migrations are like version control for your database, allowing your team to define and share the application's database schema definition. To run the migrations:

php migration.php

Generating migration

You can write your own database schema inside the migrations directory and run migration to apply them.

Migration structure

To create database schema migration create a new php file inside migrations directory.

File name should follow this naming convention: [mYourMigrationNumber_your_migration_name.php]

A migration class contains two methods: up and down. The up method is used to add new tables, columns, or indexes to your database, while the down method should reverse the operations performed by the up method.

<?php

class m0001_initial{

    public function up(){
        //
    }

    public function down(){
        //
    }
}