PHP MVC Framework
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
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 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
You can write your own database schema inside the migrations directory and run migration to apply them.
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(){
//
}
}