| @@ 33-45 (lines=13) @@ | ||
| 30 | } |
|
| 31 | ); |
|
| 32 | Schema::create( |
|
| 33 | \Illuminate\Support\Facades\Config::get('tracking.statistics.tables.routes'), function (Blueprint $table) { |
|
| 34 | // Columns |
|
| 35 | $table->increments('id'); |
|
| 36 | $table->string('name'); |
|
| 37 | $table->string('path'); |
|
| 38 | $table->string('action'); |
|
| 39 | $table->string('middleware')->nullable(); |
|
| 40 | $table->{$this->jsonable()}('parameters')->nullable(); |
|
| 41 | $table->integer('count')->unsigned()->default(0); |
|
| 42 | ||
| 43 | // Indexes |
|
| 44 | $table->unique('name'); |
|
| 45 | } |
|
| 46 | ); |
|
| 47 | Schema::create( |
|
| 48 | \Illuminate\Support\Facades\Config::get('tracking.statistics.tables.paths'), function (Blueprint $table) { |
|
| @@ 14-28 (lines=15) @@ | ||
| 11 | * |
|
| 12 | * @return void |
|
| 13 | */ |
|
| 14 | public function up() |
|
| 15 | { |
|
| 16 | Schema::create( |
|
| 17 | 'larametrics_requests', function (Blueprint $table) { |
|
| 18 | $table->increments('id'); |
|
| 19 | $table->string('method'); |
|
| 20 | $table->text('uri'); |
|
| 21 | $table->string('ip')->nullable(); |
|
| 22 | $table->text('headers')->nullable(); |
|
| 23 | $table->float('start_time', 16, 4)->nullable(); |
|
| 24 | $table->float('end_time', 16, 4)->nullable(); |
|
| 25 | $table->timestamps(); |
|
| 26 | } |
|
| 27 | ); |
|
| 28 | } |
|
| 29 | ||
| 30 | /** |
|
| 31 | * Reverse the migrations. |
|