src/Gzero/Admin/ModuleRegistry.php
public function register($name, $path)
    {
        if (!Str::contains($path, '.js')) {
            throw new \Exception('Path should lead to javascript file');
        }
        $this->modules->push(compact('name', 'path'));
    }
public function register($name, $path)
    {
        if (!Str::contains($path, '.js')) {
            throw new \Exception('Path should lead to javascript file');
        }
        $this->modules->push(compact('name', 'path'));
    }
public function register ( $ name , $ path ) { if ( ! Str :: contains ( $ path , '.js' ) ) { throw new \ Exception ( 'Path should lead to javascript file' ) ; } $ this -> modules -> push ( compact ( 'name' , 'path' ) ) ; }
Returning new admin modules

@param string $name AngularJS module name
@param string $path Path to AngularJS module file

@throws \Exception
Returning new admin modules