Completed
Push — master ( 740f0c...942037 )
by Alex
09:41
created

testController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testMethod() 0 8 1
A getCompaniesInfoFromDB() 0 8 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use DB;
6
use Illuminate\Http\Request;
7
8
use App\Http\Requests;
9
10
class testController extends Controller
11
{
12
    public function testMethod()
13
    {
14
        $companies = $this->getCompaniesInfoFromDB();
15
16
17
18
        return view('test', ['name' => $companies]);
19
    }
20
21
    public function getCompaniesInfoFromDB()
22
    {
23
        $companies = DB::table('companies')->get();
24
25
        $companies = json_encode($companies);
26
27
        return $companies;
28
    }
29
    
30
}
31