Completed
Push — master ( 9d35e1...a3c5b4 )
by Abdelrahman
01:31 queued 14s
created

CreateTestimonialsTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 13 1
A down() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
use Illuminate\Support\Facades\Schema;
6
use Illuminate\Database\Schema\Blueprint;
7
use Illuminate\Database\Migrations\Migration;
8
9
class CreateTestimonialsTable extends Migration
10
{
11
    public function up()
12
    {
13
        Schema::create(config('rinvex.testimonials.tables.testimonials'), function (Blueprint $table) {
14
            // Columns
15
            $table->increments('id');
16
            $table->morphs('subject');
17
            $table->morphs('attestant');
18
            $table->boolean('is_approved')->default(false);
19
            $table->string('body')->nullable();
20
            $table->timestamps();
21
            $table->softDeletes();
22
        });
23
    }
24
25
    public function down()
26
    {
27
        Schema::dropIfExists(config('rinvex.testimonials.tables.testimonials'));
28
    }
29
}
30