public function make($name)
    {
        $studlyCase = studly_case($name);

        // Check if already exists
        if ($this->downloaded($name)) {
            throw new Exceptions\HookAlreadyExistsException("Hook [{$name}] already exists.");
        }

        event(new Events\MakingHook($name));

        // Ensure hooks folder exists
        if (!$this->filesystem->isDirectory(base_path('hooks'))) {
            $this->filesystem->makeDirectory(base_path('hooks'));
        }

        // Create folder for the new hook
        $this->filesystem->deleteDirectory(base_path("hooks/{$name}"));
        $this->filesystem->makeDirectory(base_path("hooks/{$name}"));

        // make stub files
        $this->makeStubFiles($name);

        event(new Events\MadeHook($name));
    }
public function make($name)
    {
        $studlyCase = studly_case($name);

        // Check if already exists
        if ($this->downloaded($name)) {
            throw new Exceptions\HookAlreadyExistsException("Hook [{$name}] already exists.");
        }

        event(new Events\MakingHook($name));

        // Ensure hooks folder exists
        if (!$this->filesystem->isDirectory(base_path('hooks'))) {
            $this->filesystem->makeDirectory(base_path('hooks'));
        }

        // Create folder for the new hook
        $this->filesystem->deleteDirectory(base_path("hooks/{$name}"));
        $this->filesystem->makeDirectory(base_path("hooks/{$name}"));

        // make stub files
        $this->makeStubFiles($name);

        event(new Events\MadeHook($name));
    }
public function make ( $ name ) { $ studlyCase = studly_case ( $ name ) ; // Check if already exists if ( $ this -> downloaded ( $ name ) ) { throw new Exceptions \ HookAlreadyExistsException ( "Hook [{$name}] already exists." ) ; } event ( new Events \ MakingHook ( $ name ) ) ; // Ensure hooks folder exists if ( ! $ this -> filesystem -> isDirectory ( base_path ( 'hooks' ) ) ) { $ this -> filesystem -> makeDirectory ( base_path ( 'hooks' ) ) ; } // Create folder for the new hook $ this -> filesystem -> deleteDirectory ( base_path ( "hooks/{$name}" ) ) ; $ this -> filesystem -> makeDirectory ( base_path ( "hooks/{$name}" ) ) ; // make stub files $ this -> makeStubFiles ( $ name ) ; event ( new Events \ MadeHook ( $ name ) ) ; }
Make hook.

@param $name

@throws \Larapack\Hooks\Exceptions\HookAlreadyExistsException
Make hook .