src/classes/Console/Commands/MakeControllerCommand.php
private function getTemplate($sub_directories, $controller, $is_resource = false)
    {
        $file = __DIR__ . "/../templates/controller/";
        $file .= $is_resource ? "controller-with-resource.php.dist" : "controller.php.dist";

        if (file_exists($file))
        {
            $template = file_get_contents($file);

            return strtr($template, [
                '{{namespace}}' => get_app_namespace(),
                '{{sub_directories}}' => $sub_directories,
                '{{controller}}' => $controller
            ]);
        }

        return false;
    }
private function getTemplate($sub_directories, $controller, $is_resource = false)
    {
        $file = __DIR__ . "/../templates/controller/";
        $file .= $is_resource ? "controller-with-resource.php.dist" : "controller.php.dist";

        if (file_exists($file))
        {
            $template = file_get_contents($file);

            return strtr($template, [
                '{{namespace}}' => get_app_namespace(),
                '{{sub_directories}}' => $sub_directories,
                '{{controller}}' => $controller
            ]);
        }

        return false;
    }
private function getTemplate ( $ sub_directories , $ controller , $ is_resource = false ) { $ file = __DIR__ . "/../templates/controller/" ; $ file .= $ is_resource ? "controller-with-resource.php.dist" : "controller.php.dist" ; if ( file_exists ( $ file ) ) { $ template = file_get_contents ( $ file ) ; return strtr ( $ template , [ '{{namespace}}' => get_app_namespace ( ) , '{{sub_directories}}' => $ sub_directories , '{{controller}}' => $ controller ] ) ; } return false ; }
Get the controller template.

@param  string $sub_directories
@param  string $controller
@param  boolean $is_resource
@return mixed
Get the controller template .