Skip to content
Minimal php framework for easy application development.
HTML PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
core
src/Controllers
views
.gitignore
.htaccess
LICENSE.md
README.md
composer.json
composer.lock
index.php

README.md

LC Framework

Minimal php framework for easy application development. Inspired a little by Symfony, powered by twig.

Requirements

  • Apache server
  • PHP 7
  • Composer
  • MySQL (optionnal)

Getting started

  1. Clone the repository
  2. Change the application name in config/general.conf and rename your folder the same.
  3. Install dependencies
composer install
  1. Define your routes in config/routes.conf

That's all folks!

How to connect one database

config/database.conf

[database]
driver = "mysql"
host = "localhost"
dbname = "db"
username = "root"
password = ""
$databaseDriver = new \Core\DatabaseDriver();

How to connect many databases

config/database.conf

[databases]
firstDatabase[driver] = "mysql"
firstDatabase[host] = "localhost"
firstDatabase[dbname] = "firstDatabase"
firstDatabase[username] = "root"
firstDatabase[password] = ""

secondDatabase[driver] = "mysql"
secondDatabase[host] = "localhost"
secondDatabase[dbname] = "secondDatabase"
secondDatabase[username] = "root"
secondDatabase[password] = ""
$firstDatabaseDriver = new \Core\DatabaseDriver('firstDatabase');
$secondDatabaseDriver = new \Core\DatabaseDriver('secondDatabase');
You can’t perform that action at this time.