Passed
Push — master ( 4e0c2f...af0465 )
by Prateek
04:42 queued 02:26
created

Request::getRules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Prateekkarki\Laragen\Generators\Backend;
3
4
use Prateekkarki\Laragen\Generators\BaseGenerator;
5
use Prateekkarki\Laragen\Generators\GeneratorInterface;
6
7
class Request extends BaseGenerator implements GeneratorInterface
8
{
9
    public function generate()
10
    {
11
        $controllerTemplate = $this->buildTemplate('Backend/Request', [
12
            '{{modelName}}'     => $this->module->getModelName(),
13
            '{{authorization}}' => "true",
14
            '{{rules}}' 		=> $this->getRules()
15
        ]);
16
        
17
        $fullFilePath = $this->getPath("app/Http/Requests/Backend/").$this->module->getModelName()."Request".".php";
18
        file_put_contents($fullFilePath, $controllerTemplate);
19
        return $fullFilePath;
20
	}
21
	
22
	protected function getRules(){
23
		// Todo
24
		return "";
25
	}
26
}
27