ApisGeneratorController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 13
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A create() 0 4 1
1
<?php
2
3
namespace KMLaravel\ApiGenerator\Controllers;
4
5
use App\Http\Controllers\Controller;
6
use KMLaravel\ApiGenerator\Services\GeneratorService;
7
use KMLaravel\ApiGenerator\Requests\ApisGeneratorRequest;
8
9
class ApisGeneratorController extends Controller
10
{
11
    protected $generatorService;
12
13
    public function __construct()
14
    {
15
        $this->generatorService = new GeneratorService();
16
    }
17
18
    public function create(ApisGeneratorRequest $request)
19
    {
20
        $this->generatorService->initialRequest($request)->generateApi();
21
        return redirect()->route('apisGenerator.index')->with('session_success' , 'create new api successfully');
22
    }
23
}
24