Completed
Push — master ( bb22e0...a8c1a4 )
by Iman
15s
created

CbStructure::ctrlNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace crocodicstudio\crudbooster\helpers;
4
5
class CbStructure
6
{
7
    public static function componentsPath($type = '')
8
    {
9
        $componentPath = implode(DIRECTORY_SEPARATOR, ['vendor', 'crocodicstudio', 'crudbooster', 'src', 'views', 'form', 'type_components', $type]);
10
11
        return base_path($componentPath);
12
    }
13
14
    public static function publishedComponentsPath($type = '')
15
    {
16
        $Path = implode(DIRECTORY_SEPARATOR, ['views', 'vendor', 'crudbooster', 'type_components', $type]);
17
18
        return resource_path($Path);
19
    }
20
21
    public static function controllersDir()
22
    {
23
        $_ = DIRECTORY_SEPARATOR;
24
        return app_path('Http'.$_.'Controllers'.$_);
25
    }
26
27
    public static function controllerPath($controller)
28
    {
29
        return self::controllersDir().$controller.'.php';
30
    }
31
32
    public static function cbModulesNS($path = '')
33
    {
34
        return '\crocodicstudio\crudbooster\Modules\\'.$path;
35
    }
36
37
    public static function ctrlNamespace()
38
    {
39
        return 'App\Http\Controllers';
40
    }
41
}