Skip to content

LukaChassaing/framework

Repository files navigation

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');

About

Minimal php framework for easy application development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published