| Total Complexity | 7 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ModulesRepo |
||
| 8 | { |
||
| 9 | public static function getControllerName($moduleId) |
||
| 12 | } |
||
| 13 | |||
| 14 | public static function find($id) |
||
| 17 | } |
||
| 18 | |||
| 19 | public static function getByTableName($table) |
||
| 20 | { |
||
| 21 | return DB::table('cms_moduls')->where('table_name', $table)->first(); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param $path |
||
| 26 | * @return mixed |
||
| 27 | */ |
||
| 28 | public static function modulePathExists($path) |
||
| 29 | { |
||
| 30 | return (boolean)DB::table('cms_moduls')->where('path', $path)->where('deleted_at', null)->count(); |
||
| 31 | } |
||
| 32 | |||
| 33 | public static function updateById($id, $data) |
||
| 34 | { |
||
| 35 | return DB::table('cms_moduls')->where('id', $id)->update($data); |
||
| 36 | } |
||
| 37 | |||
| 38 | public static function getByPath($modulepath) |
||
| 41 | |||
| 42 | |||
| 43 | } |
||
| 44 | public static function countByPath($modulepath) |
||
| 47 | } |
||
| 48 | |||
| 49 | |||
| 50 | } |