FEATURE: add first basics of profiler

This commit is contained in:
Michal Kváček
2017-02-22 08:54:26 +01:00
parent 5132278ee1
commit c027ffe2df
23 changed files with 293 additions and 0 deletions
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateQueriesLogTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('queries_log', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->text('query');
$table->text('bindings');
$table->double('time');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('queries_log');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateHttpLogTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('http_log', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->string('method');
$table->text('url');
$table->double('time');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('http_log');
}
}
@@ -0,0 +1,20 @@
<?php namespace Modules\Profiler\Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class ProfilerDatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
// $this->call("OthersTableSeeder");
}
}