Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

1.6KB

MindVisionCode PHP

A small PHP MVC framework inspired by a Classic ASP MVC framework.

Run

composer install
php scripts/migrate.php up
php -S localhost:8000 -t public

Open:

http://localhost:8000

Try:

http://localhost:8000/users/123

Employee form:

http://localhost:8000/employees

Request Flow

Browser → public/index.php → Request → Dispatcher → Router → Route → Controller → ViewModel/Repository → View → Response

Main Folders

  • core/ framework classes
  • app/Controllers/ application controllers
  • app/ViewModels/ view model classes
  • app/Repositories/ data access classes
  • app/Views/ PHP templates
  • routes/web.php route definitions
  • database/migrations/ migrations
  • scripts/ runnable PHP CLI scripts

SQLite

The default database is SQLite and points to:

database/app.sqlite

The database file is created automatically when the app first needs it.

Run migrations from the PHP CLI:

php scripts/migrate.php up
php scripts/migrate.php down
php scripts/migrate.php status
php scripts/migrate.php make create_projects_table
php scripts/migrate.php fresh
php scripts/migrate.php fresh --seed
php scripts/seed_employees.php 1000

Frontend Libraries

The employee directory page uses:

  • htmx for fragment-based form and summary updates
  • Alpine.js for lightweight page state
  • Tabulator for the interactive employee table

Flow chart

See REQUEST_FLOW.md for a chart of how requests and responses move through the framework.

Powered by TurnKey Linux.