CreateApiManagerTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 13
rs 9.4285
cc 1
eloc 10
nc 1
nop 0
1
<?php
2
3
/**
4
 * @Author: bantenprov
5
 * @Date:   2017-11-28 00:54:01
6
 * @Last Modified by:   bantenprov
7
 * @Last Modified time: 2017-11-28 00:54:10
8
 */
9
10
use Illuminate\Support\Facades\Schema;
11
use Illuminate\Database\Migrations\Migration;
12
use Illuminate\Database\Schema\Blueprint;
13
14
class CreateApiManagerTable extends Migration {
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
15
16
	public function up()
17
	{
18
		Schema::create('api_keys', function(Blueprint $table) {
19
			$table->increments('id');
20
			$table->timestamps();
21
			$table->softDeletes();
22
			$table->integer('user_id');
23
			$table->string('client', 225);
24
			$table->string('api_key', 255);
25
			$table->text('description');
26
			$table->integer('is_published')->default('1');
27
		});
28
	}
29
30
	public function down()
31
	{
32
		Schema::drop('api_keys');
33
	}
34
}
35