src/classes/Console/Commands/MakeDebugbarCommand.php
private function makeTemplate($debugbar)
    {
        $file = __DIR__ . "/../templates/debugbar.php.dist";
        if (file_exists($file))
        {
            $template = strtr(file_get_contents($file), [
                '{{namespace}}' => get_app_namespace(),
                '{{debugbar}}' => $debugbar
            ]);

            if (!file_exists(app_path("Debugbars")))
            {
                mkdir(app_path("Debugbars"), 0755, true);
            }

            $file_path = app_path("Debugbars/{$debugbar}.php");

            $file = fopen($file_path, "w");
            fwrite($file, $template);
            fclose($file);

            return file_exists($file_path);
        }

        return false;
    }
private function makeTemplate($debugbar)
    {
        $file = __DIR__ . "/../templates/debugbar.php.dist";
        if (file_exists($file))
        {
            $template = strtr(file_get_contents($file), [
                '{{namespace}}' => get_app_namespace(),
                '{{debugbar}}' => $debugbar
            ]);

            if (!file_exists(app_path("Debugbars")))
            {
                mkdir(app_path("Debugbars"), 0755, true);
            }

            $file_path = app_path("Debugbars/{$debugbar}.php");

            $file = fopen($file_path, "w");
            fwrite($file, $template);
            fclose($file);

            return file_exists($file_path);
        }

        return false;
    }
private function makeTemplate ( $ debugbar ) { $ file = __DIR__ . "/../templates/debugbar.php.dist" ; if ( file_exists ( $ file ) ) { $ template = strtr ( file_get_contents ( $ file ) , [ '{{namespace}}' => get_app_namespace ( ) , '{{debugbar}}' => $ debugbar ] ) ; if ( ! file_exists ( app_path ( "Debugbars" ) ) ) { mkdir ( app_path ( "Debugbars" ) , 0755 , true ) ; } $ file_path = app_path ( "Debugbars/{$debugbar}.php" ) ; $ file = fopen ( $ file_path , "w" ) ; fwrite ( $ file , $ template ) ; fclose ( $ file ) ; return file_exists ( $ file_path ) ; } return false ; }
Create the debugbar template.

@depends handle
@param  string $debugbar
@return boolean
Create the debugbar template .