Completed
Branch proxy (a8ed88)
by leo
08:29
created

CreateUsersTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 9 1
A down() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: leo108
5
 * Date: 2016/9/29
6
 * Time: 09:57
7
 */
8
use Illuminate\Database\Schema\Blueprint;
9
use Illuminate\Database\Migrations\Migration;
10
11
class CreateUsersTable 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...
12
{
13
    /**
14
     * Run the migrations.
15
     *
16
     * @return void
17
     */
18
    public function up()
19
    {
20
        Schema::create('cas_users', function (Blueprint $table) {
21
            $table->increments('id');
22
            $table->string('name')->unique();
23
            $table->string('real_name');
24
            $table->timestamps();
25
        });
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     *
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        Schema::drop('cas_users');
36
    }
37
}
38