Essential Core Application

v22.12.02 2022-12-29 08:30 UTC

This package is auto-updated.

Last update: 2024-04-05 14:52:34 UTC


README

MVC in PHP

Features

  • MVC Architecture
  • Supports MariaDB and SQLite
  • Simple Authentication
  • All licenses are MIT at the time of writing (Dec. 2022)

What

This is a PHP PSR-4 Framework - www.php-fig.org/psr/psr-4/

Why

To craft PHP applications you need this style of Framework

This is a Model-View-Controller Application in PHP

It:

  • Creates an entry point
  • Loads php scripts as required
  • Calls a Controller
    • Models data
    • Displays a View

foo

How

  1. Create a composer file
{
  "license": "MIT",
  "minimum-stability": "dev",
  "autoload": {
    "psr-4": {
      "": "src/app"
    }
  },
  "require": {
    "bravedave/esse": "dev-main"
  }
}
  1. update to install files
composer u
  1. install a sample application
mkdir src
cp -r vendor/bravedave/esse/src/app src/app
cp -r vendor/bravedave/esse/www .
  1. Run
cd www
php -S localhost:8080 _mvp.php

the program will run, but there are no users or database

  • a data folder was created in src/data
    1. rename the esse-defaults-sample.json to esse-defaults.json - activates SQLite as the database
    2. create a user in users with a password
    3. logoff
    4. authentication is now required

dive into the app folder and build your app ! etc .. etc..

Credits: