PHP code example of toanlk / codeigniter_telescope

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

    

toanlk / codeigniter_telescope example snippets


$config['composer_autoload'] = FALSE;
↓
$config['composer_autoload'] = realpath(APPPATH . '../vendor/autoload.php');

class Logs extends CI_Controller
{
    private $logViewer;

    public function __construct()
	{
        parent::__construct(); 
        $this->load->helper('url');
        $this->logViewer = new \CI_Telescope\CI_Telescope();
    }

	public function index()
	{
        echo $this->logViewer->show();
    }

    // --------------------------------------------------------------------

    public function get_last_logs()
    {
        echo $this->logViewer->get_last_logs();
    }
}