PHP code example of jahurul1 / ji-framework

1. Go to this page and download the library: Download jahurul1/ji-framework 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/ */

    

jahurul1 / ji-framework example snippets


// Initialize the framework
ance
$app = new JiFramework\Core\App\App();

// Your application code here

// Get database connection via the application instance
$db = $app->db;

// Or create a new instance directly
$db = new JiFramework\Core\Database\QueryBuilder();

// Perform database operations
$users = $db->table('users')
            ->where('status', 'active')
            ->orderBy('name', 'ASC')
            ->get();

// Using the App container
use JIFramework\Core\App\App;

$app = new App();
$db = $app->db;
$logger = $app->logger;
$session = $app->sessionManager;

// Or instantiate components directly
use JIFramework\Core\Database\QueryBuilder;

$db = new QueryBuilder();
$results = $db->table('users')->where('status', 'active')->get();