PHP code example of fusic / accesslogs
1. Go to this page and download the library: Download fusic/accesslogs 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/ */
fusic / accesslogs example snippets
use Migrations\AbstractMigration;
class AccessLogs extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
*/
public function change()
{
$table = $this->table('access_logs');
$table->addColumn('user_id', 'integer', ['null' => true])
->addColumn('controller', 'string', ['null' => true, 'limit' => 255])
->addColumn('action', 'string', ['null' => true, 'limit' => 255])
->addColumn('passes', 'string', ['null' => true, 'limit' => 255])
->addColumn('client_ip', 'string', ['null' => true, 'limit' => 255])
->addColumn('url', 'string', ['null' => true])
->addColumn('code', 'string', ['null' => true, 'limit' => 255])
->addColumn('query', 'text', ['null' => true])
->addColumn('data', 'text', ['null' => true])
->addColumn('created', 'timestamp', ['null' => false])
->addIndex('user_id')
->addIndex('controller')
->addIndex('action')
->addIndex('passes')
->addIndex('client_ip')
->addIndex('code')
->create();
}
}