Bright Web Development framework

Bright was designed to be simple and flexible. Let's check it out.

Creating Bright-based project

  1. Create project folder
  2. mkdir bright_site
    cd ./bright_site
    
  3. Install framework via composer
  4. composer require jagermesh/bright
    
  5. Create project template
  6. php vendor/jagermesh/bright/tools/init.php web
    
  7. Creatae MySQL database
  8. Copy database connection configuration file from template
  9. cp config.db.example.php config.db.php
    
  10. Configure database connection in /config.db.php. For example:
  11. <?php
    
    br()->config()->set( 'br/db'
                     , array( 'engine'     => 'mysql'
                            , 'hostname'   => 'localhost'
                            , 'name'       => 'bright_site'
                            , 'username'   => 'root'
                            , 'password'   => ''
                            , 'charset'    => 'UTF8'
                            ));
    
  12. Run migrations to create tables
  13. php database/run-patches.php
    

Done

Using Bright in existing project.

  1. Install framework via composer
  2. composer require jagermesh/bright
    
  3. Include Bright core file into your script
  4. require_once(__DIR__ . '/vendor/jagermesh/bright/Br.php');
    

Now you can use magic br() function to access Bright helpers.