PHP code example of timosh / php-activerecord-profiler-service

1. Go to this page and download the library: Download timosh/php-activerecord-profiler-service 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/ */

    

timosh / php-activerecord-profiler-service example snippets


$app->register(new \ActiveRecordServiceProvider\ActiveRecord(array(
        'ar.model_path'   => __DIR__.'/Model',
        'ar.default_connection' => 'development',
        'ar.connections' => array(
            'development' => 'mysql://user:password@host/database'
        ),
        'db.active_record.logger'=> new ActiveRecordServiceProvider\Logger(), //here we enabling our logger
    ))
);