PHP code example of basicis / core

1. Go to this page and download the library: Download basicis/core library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

basicis / core example snippets


//config/app-config.php
** Loading Enviroment variables */
Basicis::loadEnv();

/**
 * $app variable
 * Create an instance of Basicis\Basicis and setting arguments
 * @var Basicis $app
 */
$app = Basicis::createApp(
    [
      "server" => $_SERVER,
      "files" => $_FILES,
      "cookie" => $_COOKIE,
      //"cache" => true, //defalut false
      /*
      Default token params
      "token" => [
        "iss" => APP_DESCRIPTION | "",
        "expiration" => "+30 minutes",
        "nobefore" => "now",
      ]
      */
    ]
);

/**
 * Setting Controllers definitions
 */
$app->setControllers([
  //Key ,
  "development" => new App\Middlewares\Development,
  "guest" => new App\Middlewares\Guest,
  "auth" => new App\Middlewares\Auth,
  //...
]);

//After route middlweares
$app->setAfterMiddlewares([
  //key no is 

//public/index.php

//Basicis $app configuration and bootstrap
$app = run();
    exit;
}
exit("Error on Start Basicis framework application!");